home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-07-11 | 111.8 KB | 4,546 lines |
- *** /usr/storm/nn6.3.3/patchlevel.h Fri Jun 30 11:30:40 1989
- --- patchlevel.h Mon Jul 10 12:40:46 1989
- ***************
- *** 11,17 ****
- * 1989-06-06: Patch 1: rc.c
- * 1989-06-28: Patch 2: several files
- * 1989-06-30: Patch 3: several files
- */
-
- ! #define PATCHLEVEL 3
-
- --- 11,18 ----
- * 1989-06-06: Patch 1: rc.c
- * 1989-06-28: Patch 2: several files
- * 1989-06-30: Patch 3: several files
- + * 1989-07-10: Patch 4: several files
- */
-
- ! #define PATCHLEVEL 4
-
-
- *** /usr/storm/nn6.3.0/admin.c Thu Jun 1 11:10:41 1989
- --- admin.c Wed Jul 5 14:54:49 1989
- ***************
- *** 34,40 ****
- raw();
- c = get_c();
- no_raw();
- ! printf("%c\n\n\r", c);
- }
-
- if (islower(c))
- --- 34,43 ----
- raw();
- c = get_c();
- no_raw();
- ! if (c == K_interrupt)
- ! s_keyboard++;
- ! else
- ! printf("%c\n\n\r", c);
- }
-
- if (islower(c))
- ***************
- *** 49,55 ****
- long min_val, max_val;
- {
- char buf[100];
- ! int val;
-
- loop:
-
- --- 52,58 ----
- long min_val, max_val;
- {
- char buf[100];
- ! long val;
-
- loop:
-
- ***************
- *** 56,63 ****
- printf("%s %ld..%ld (or all): ", prompt_str, min_val, max_val);
- fl;
- gets(buf);
- ! if (buf[0] == 'a')
- ! return -1;
-
- val = atol(buf);
- if (val < min_val || val > max_val) goto loop;
- --- 59,66 ----
- printf("%s %ld..%ld (or all): ", prompt_str, min_val, max_val);
- fl;
- gets(buf);
- ! if (buf[0] == 'a' || buf[0] == NUL)
- ! return -1L;
-
- val = atol(buf);
- if (val < min_val || val > max_val) goto loop;
- ***************
- *** 181,187 ****
- static master_admin()
- {
- register char c;
- ! int cur_group, value;
- register group_header *gh;
-
- for (;;) {
- --- 184,191 ----
- static master_admin()
- {
- register char c;
- ! int cur_group;
- ! long value;
- register group_header *gh;
-
- for (;;) {
- ***************
- *** 190,196 ****
- "MASTER")) {
-
- case 'G':
- ! cur_group = get_entry("Group number",
- 0L, (long)(master.number_of_groups - 1));
- if (cur_group >= 0)
- dump_m_entry(&active_groups[cur_group]);
- --- 194,200 ----
- "MASTER")) {
-
- case 'G':
- ! cur_group = (int)get_entry("Group number",
- 0L, (long)(master.number_of_groups - 1));
- if (cur_group >= 0)
- dump_m_entry(&active_groups[cur_group]);
- ***************
- *** 219,227 ****
- case 'O':
- c = get_cmd("r)epeat_delay e)xpire_level", "OPTION");
- if (c != 'r' && c != 'e') break;
- ! value = get_entry("Option value", 1, 10000);
- if (value < 0) break;
- ! send_master(c, (long)value, 0L);
- break;
-
- case 'S':
- --- 223,231 ----
- case 'O':
- c = get_cmd("r)epeat_delay e)xpire_level", "OPTION");
- if (c != 'r' && c != 'e') break;
- ! value = get_entry("Option value", 1L, 10000L);
- if (value < 0) break;
- ! send_master(c, value, 0L);
- break;
-
- case 'S':
- ***************
- *** 586,596 ****
- article_number first_article, next_article, this_art;
- int n, was_digest;
- char buffer[512];
- -
- - if (init_group(gh) <= 0)
- - printf("cannot access group %s\n", gh->group_name);
-
- ! update_group(gh);
-
- if (validate)
- first_article = gh->first_l_article;
- --- 590,602 ----
- article_number first_article, next_article, this_art;
- int n, was_digest;
- char buffer[512];
-
- ! if (!validate) {
- ! if (init_group(gh) <= 0)
- ! printf("cannot access group %s\n", gh->group_name);
- !
- ! update_group(gh);
- ! }
-
- if (validate)
- first_article = gh->first_l_article;
- ***************
- *** 600,606 ****
- (long)gh->last_l_article);
-
- if (first_article < 0) first_article = gh->first_l_article;
- !
- ix = open_data_file(gh, 'x', OPEN_READ);
- if (ix == NULL) {
- if (verbose) printf("NO INDEX FILE\n");
- --- 606,613 ----
- (long)gh->last_l_article);
-
- if (first_article < 0) first_article = gh->first_l_article;
- ! if (first_article <= 0) first_article = 1;
- !
- ix = open_data_file(gh, 'x', OPEN_READ);
- if (ix == NULL) {
- if (verbose) printf("NO INDEX FILE\n");
- ***************
- *** 906,911 ****
- --- 913,919 ----
- if (init_group(gh) <= 0) continue; /* no directory */
-
- if (verbose) { printf("\r%s: ", gh->group_name); clrline(); }
- + update_group(gh);
-
- if (gh->group_flag & G_BLOCKED) {
- if (verbose) printf("BLOCKED\n");
-
- *** /usr/storm/nn6.3.3/answer.c Fri Jun 30 11:30:41 1989
- --- answer.c Wed Jul 5 17:16:05 1989
- ***************
- *** 5,13 ****
-
- extern char *temp_file;
-
- ! char *news_record = NULL;
- ! char *mail_record = NULL;
-
-
- #define INCL_MARK_SIZE 10
-
- --- 5,18 ----
-
- extern char *temp_file;
-
- ! export char *default_distribution = NULL;
- ! export char *extra_mail_headers = NULL;
- ! export char *extra_news_headers = NULL;
- ! export char *mail_record = NULL;
- ! export char *news_record = NULL;
-
- + export int nn_re_style = 0; /* use Re^n: in replies */
- + export int include_art_id = 0;
-
- #define INCL_MARK_SIZE 10
-
- ***************
- *** 97,104 ****
-
- ng_line(t);
- ref_line(t);
- !
- ! end_header(t);
-
- if (incl) {
- fprintf(t, "In %s you write:\n", current_group->group_name);
- --- 102,109 ----
-
- ng_line(t);
- ref_line(t);
- !
- ! end_header(t, extra_mail_headers);
-
- if (incl) {
- fprintf(t, "In %s you write:\n", current_group->group_name);
- ***************
- *** 135,145 ****
- }
-
- ref_line(t);
- !
- ! end_header(t);
-
- if (incl) {
- if (news.ng_from) {
- fprintf(t, "%s writes:\n", news.ng_from);
- ed_line++;
- } else
- --- 140,154 ----
- }
-
- ref_line(t);
- !
- ! end_header(t, extra_news_headers);
-
- if (incl) {
- if (news.ng_from) {
- + if (include_art_id && news.ng_ident)
- + fprintf(t, "In %s %s ",
- + ah->flag & A_DIGEST ? "digest" : "article",
- + news.ng_ident);
- fprintf(t, "%s writes:\n", news.ng_from);
- ed_line++;
- } else
- ***************
- *** 179,185 ****
-
- subj_line(t, -1, str, (char *)NULL);
-
- ! end_header(t);
-
- if (incl) {
- prompt("\1Edit\1 forwarded message? ");
- --- 188,194 ----
-
- subj_line(t, -1, str, (char *)NULL);
-
- ! end_header(t, extra_mail_headers);
-
- if (incl) {
- prompt("\1Edit\1 forwarded message? ");
- ***************
- *** 325,332 ****
- if (str == NULL) return 0;
- strcpy(keywords, str);
-
- ! strcpy(distribution, group_name);
- ! if (str = strchr(distribution, '.')) *str = NUL;
-
- prompt("\1Distribution\1 (default '%s') ", distribution);
- str = get_s(NONE, NONE, NONE, NO_COMPLETION);
- --- 334,345 ----
- if (str == NULL) return 0;
- strcpy(keywords, str);
-
- ! if (default_distribution != NULL)
- ! strcpy(distribution, default_distribution);
- ! else {
- ! strcpy(distribution, group_name);
- ! if (str = strchr(distribution, '.')) *str = NUL;
- ! }
-
- prompt("\1Distribution\1 (default '%s') ", distribution);
- str = get_s(NONE, NONE, NONE, NO_COMPLETION);
- ***************
- *** 348,354 ****
- fprintf(t, "Keywords: %s\n", keywords);
- ed_line++;
- }
- ! fputc(NL, t);
- fputc(NL, t);
-
- fclose(t);
- --- 361,368 ----
- fprintf(t, "Keywords: %s\n", keywords);
- ed_line++;
- }
- !
- ! end_header(t, extra_news_headers);
- fputc(NL, t);
-
- fclose(t);
- ***************
- *** 367,373 ****
-
- fputs("Subject: ", t);
-
- ! if (re == 0)
- fputs("Re: ", t);
- else if (re > 0)
- fprintf(t, "Re^%d: ", re + 1);
- --- 381,387 ----
-
- fputs("Subject: ", t);
-
- ! if (re == 0 || !nn_re_style)
- fputs("Re: ", t);
- else if (re > 0)
- fprintf(t, "Re^%d: ", re + 1);
- ***************
- *** 427,435 ****
- ed_line++;
- }
-
- ! static end_header(t)
- FILE *t;
- {
- fputc(NL, t);
- ed_line++;
- }
- --- 441,463 ----
- ed_line++;
- }
-
- ! static end_header(t, extra_headers)
- FILE *t;
- + register char *extra_headers;
- {
- + if (extra_headers != NULL && *extra_headers != NUL) {
- + while (*extra_headers != NUL) {
- + if (*extra_headers == ';') {
- + if (*++extra_headers == NUL) break;
- + fputc(NL, t);
- + ed_line++;
- + } else
- + fputc(*extra_headers++, t);
- + }
- + fputc(NL, t);
- + ed_line++;
- + }
- +
- fputc(NL, t);
- ed_line++;
- }
-
- *** /usr/storm/nn6.3.0/articles.c Thu Jun 1 11:10:41 1989
- --- articles.c Sat Jul 8 17:10:23 1989
- ***************
- *** 29,39 ****
- static thunk *current_str_t = &dummy_str_t;
- static thunk *first_art_t = &dummy_art_t;
- static thunk *current_art_t = &dummy_art_t;
- ! static int cur_str_size = 0, cur_art_size = 0;
- static char *next_str;
- static article_header *next_art, **art_array;
-
- ! static unsigned max_articles = 0, mem_offset = 0;
-
- /*
- * allocate one article header
- --- 29,39 ----
- static thunk *current_str_t = &dummy_str_t;
- static thunk *first_art_t = &dummy_art_t;
- static thunk *current_art_t = &dummy_art_t;
- ! static long cur_str_size = 0, cur_art_size = 0;
- static char *next_str;
- static article_header *next_art, **art_array;
-
- ! static article_number max_articles = 0, mem_offset = 0;
-
- /*
- * allocate one article header
- ***************
- *** 54,60 ****
- mem_check(ptr, (int)size, chk_msg);
-
- new = (thunk *)calloc(1, sizeof(thunk));
- ! mem_check(new, sizeof(thunk), "memory thunk");
-
- new->next_thunk = t->next_thunk;
- t->next_thunk = new;
- --- 54,60 ----
- mem_check(ptr, (int)size, chk_msg);
-
- new = (thunk *)calloc(1, sizeof(thunk));
- ! mem_check((char *)new, sizeof(thunk), "memory thunk");
-
- new->next_thunk = t->next_thunk;
- t->next_thunk = new;
- ***************
- *** 99,105 ****
- if (current_str_t->next_thunk == NULL)
- new_thunk(current_str_t,
- malloc(STR_THUNK_SIZE),
- ! STR_THUNK_SIZE,
- "string bytes");
-
- current_str_t = current_str_t->next_thunk;
- --- 99,105 ----
- if (current_str_t->next_thunk == NULL)
- new_thunk(current_str_t,
- malloc(STR_THUNK_SIZE),
- ! (long)STR_THUNK_SIZE,
- "string bytes");
-
- current_str_t = current_str_t->next_thunk;
- ***************
- *** 226,232 ****
- }
- art_array = (article_header **)
- calloc(max_articles, sizeof(article_header **));
- ! mem_check(art_array, (int)max_articles, "article headers");
- while (--n >= 0) art_array[n] = *--articles;
- articles = art_array + mem_offset;
- }
- --- 226,232 ----
- }
- art_array = (article_header **)
- calloc(max_articles, sizeof(article_header **));
- ! mem_check((char *)art_array, (int)max_articles, "article headers");
- while (--n >= 0) art_array[n] = *--articles;
- articles = art_array + mem_offset;
- }
- ***************
- *** 322,328 ****
-
- if (n_articles <= 1) return;
-
- ! qsort(articles, n_articles, sizeof(article_header *), article_comp);
-
- for (n = n_articles - 1, app = articles + 1; --n >= 0; app++)
- if (article_equal(app, app - 1)) (**app).flag |= A_SAME;
- --- 322,328 ----
-
- if (n_articles <= 1) return;
-
- ! qsort((char *)articles, (int)n_articles, sizeof(article_header *), article_comp);
-
- for (n = n_articles - 1, app = articles + 1; --n >= 0; app++)
- if (article_equal(app, app - 1)) (**app).flag |= A_SAME;
- ***************
- *** 332,343 ****
- static offset_cmp(a, b)
- article_header **a, **b;
- {
- ! register i;
-
- ! if (i = (int)((*a)->a_number - (*b)->a_number))
- ! return i;
- !
- ! return (int)((*a)->fpos - (*b)->fpos);
- }
-
- static age_cmp(ah1, ah2)
- --- 332,343 ----
- static offset_cmp(a, b)
- article_header **a, **b;
- {
- ! register long i;
-
- ! if ((i = (int)((*a)->a_number - (*b)->a_number)) == 0)
- ! i = (*a)->fpos - (*b)->fpos;
- !
- ! return (i > 0) ? 1 : (i < 0) ? -1 : 0;
- }
-
- static age_cmp(ah1, ah2)
- ***************
- *** 351,363 ****
-
- unsort_articles(arrival)
- {
- ! register int i;
-
- for (i = n_articles; --i >= 0;)
- articles[i]->flag &= ~A_SAME;
-
- if (n_articles <= 1) return;
- ! qsort(articles, n_articles, sizeof(article_header *),
- arrival ? offset_cmp : age_cmp);
- }
-
- --- 351,412 ----
-
- unsort_articles(arrival)
- {
- ! register article_number i;
-
- for (i = n_articles; --i >= 0;)
- articles[i]->flag &= ~A_SAME;
-
- if (n_articles <= 1) return;
- ! qsort((char *)articles, (int)n_articles, sizeof(article_header *),
- arrival ? offset_cmp : age_cmp);
- }
-
- + /*
- + * Eliminate articles with the A_KILL flag set preserving the present ordering.
- + * This will only release the last entries in the articles array.
- + * Neither strings nor articles headers are released.
- + */
- +
- + elim_articles(list, list_lgt)
- + register article_number *list;
- + int list_lgt;
- + {
- + register article_header **srca, **desta;
- + register article_number n, count;
- + int changed, llen;
- +
- + count = 0;
- + changed = 0, llen = 0;
- + for (n = 0, srca = desta = articles; n < n_articles; n++, srca++) {
- + if ((*srca)->flag & A_KILL) {
- + if (list_lgt > 0) {
- + if (n < *list) {
- + if (llen) changed = 1;
- + } else
- + if (n == *list) {
- + if (llen) {
- + llen++;
- + list_lgt--;
- + *list++ = -1;
- + } else
- + ++(*list);
- + changed = 1;
- + }
- + }
- + continue;
- + }
- + if (list_lgt > 0 && n == *list) {
- + *list++ = count;
- + list_lgt--;
- + llen++;
- + }
- + count++;
- + *desta++ = *srca;
- + }
- + if (list_lgt > 0) {
- + if (!llen) *list = 0;
- + changed = 1;
- + }
- + n_articles = count;
- + return changed;
- + }
-
- *** /usr/storm/nn6.3.3/collect.c Fri Jun 30 11:30:42 1989
- --- collect.c Tue Jul 4 18:21:16 1989
- ***************
- *** 13,22 ****
- * On entry, init_group has been called to setup the proper environment
- */
-
- ! collect_group(gh)
- register group_header *gh;
- {
- ! int article_count, temp;
- article_number start_collect;
-
- if (gh->last_l_article == 0) {
- --- 13,22 ----
- * On entry, init_group has been called to setup the proper environment
- */
-
- ! long collect_group(gh)
- register group_header *gh;
- {
- ! long article_count, temp;
- article_number start_collect;
-
- if (gh->last_l_article == 0) {
-
- *** /usr/storm/nn6.3.3/data.h Fri Jun 30 11:30:43 1989
- --- data.h Sat Jul 8 16:21:38 1989
- ***************
- *** 36,43 ****
-
- int32 group_flag;
-
- ! # define MF(n) (1<<(n-1))
- ! # define CF(n) (1<<(n+15))
-
- # define G_MASTER_FLAGS (MF(17)-1) /* flags that are saved on file */
-
- --- 36,43 ----
-
- int32 group_flag;
-
- ! # define MF(n) (((int32)1)<<(n-1))
- ! # define CF(n) (((int32)1)<<(n+15))
-
- # define G_MASTER_FLAGS (MF(17)-1) /* flags that are saved on file */
-
- ***************
- *** 122,128 ****
-
- int32 flag; /* flags: */
-
- ! # define AF(n) (1<<(n-1))
-
- # define A_SELECT AF(1) /* article has been selected */
- # define A_SAME AF(2) /* same subject as prev. article */
- --- 122,128 ----
-
- int32 flag; /* flags: */
-
- ! # define AF(n) (((int32)1)<<(n-1))
-
- # define A_SELECT AF(1) /* article has been selected */
- # define A_SAME AF(2) /* same subject as prev. article */
- ***************
- *** 132,137 ****
- --- 132,142 ----
- # define A_FOLDER AF(6) /* article file = "folder_path" */
- # define A_CANCEL AF(7) /* folder entry cancelled */
- # define A_SEEN AF(8) /* article presented on menu */
- + # define A_KILL AF(9) /* eliminate article */
- + # define A_AUTO AF(10) /* article was auto selected */
- + # define A_READ AF(11) /* article has been read */
- + # define A_LEAVE AF(12) /* marked for later activity */
- + # define A_LEAVE_NEXT AF(13) /* marked for next invokation */
-
- # define A_ST_FILED AF(16) /* articles is saved */
- # define A_ST_REPLY AF(17) /* sent reply to article */
-
- *** /usr/storm/nn6.3.0/db.c Thu Jun 1 11:10:42 1989
- --- db.c Wed Jul 5 15:36:56 1989
- ***************
- *** 29,36 ****
-
- current_group = gh;
-
- - if (gh->group_flag & G_NO_DIRECTORY) return 0;
- -
- if (gh->group_flag & G_FOLDER) {
- group_position = NULL;
- group_file_name = NULL;
- --- 29,34 ----
- ***************
- *** 47,52 ****
- --- 45,51 ----
- if (is_master)
- group_position = group_path_name;
- else {
- + if (gh->group_flag & G_NO_DIRECTORY) return 0;
- strcpy(group_path_name, news_directory);
- group_position = group_path_name + strlen(group_path_name);
- *group_position++ = '/';
- ***************
- *** 109,115 ****
- open_master(mode)
- {
- FILE *g;
- ! int entries, n, cur_group;
- char *strings;
- register group_header *gh;
- static int first_open = 1;
- --- 108,115 ----
- open_master(mode)
- {
- FILE *g;
- ! int n, cur_group;
- ! unsigned entries;
- char *strings;
- register group_header *gh;
- static int first_open = 1;
- ***************
- *** 133,141 ****
-
- sorted_groups = (group_header **)
- calloc(entries, sizeof(group_header *));
- ! mem_check(sorted_groups, entries, "sorted group header pointers");
-
- ! strings = malloc((int)master.next_group_write_offset);
- mem_check(strings, (int)master.next_group_write_offset,
- "bytes for group names");
-
- --- 133,141 ----
-
- sorted_groups = (group_header **)
- calloc(entries, sizeof(group_header *));
- ! mem_check((char *)sorted_groups, entries, "sorted group header pointers");
-
- ! strings = malloc((unsigned)master.next_group_write_offset);
- mem_check(strings, (int)master.next_group_write_offset,
- "bytes for group names");
-
- ***************
- *** 177,183 ****
- update_group(gh)
- group_header *gh;
- {
- ! int flag;
-
- flag = gh->group_flag & ~G_MASTER_FLAGS;
-
- --- 177,183 ----
- update_group(gh)
- group_header *gh;
- {
- ! int32 flag;
-
- flag = gh->group_flag & ~G_MASTER_FLAGS;
-
- ***************
- *** 200,206 ****
-
- sort_groups()
- {
- ! qsort(sorted_groups, master.number_of_groups,
- sizeof(group_header *), group_name_cmp);
- }
-
- --- 200,206 ----
-
- sort_groups()
- {
- ! qsort((char *)sorted_groups, (unsigned)master.number_of_groups,
- sizeof(group_header *), group_name_cmp);
- }
-
- ***************
- *** 331,337 ****
- if (fwrite(buf, sizeof(net_long), MASTER_FIELDS, f) != MASTER_FIELDS) return 0;
- #else
-
- ! if (fwrite(masterp, sizeof(master_header), 1, f) != 1) return 0;
- #endif
- return 1;
- }
- --- 331,337 ----
- if (fwrite(buf, sizeof(net_long), MASTER_FIELDS, f) != MASTER_FIELDS) return 0;
- #else
-
- ! if (fwrite((char *)masterp, sizeof(master_header), 1, f) != 1) return 0;
- #endif
- return 1;
- }
- ***************
- *** 397,403 ****
- if (n >= 0)
- fseek(f, (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * n), 0);
-
- ! if (fwrite(gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, f) != 1)
- return 0;
- #endif
-
- --- 397,403 ----
- if (n >= 0)
- fseek(f, (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * n), 0);
-
- ! if (fwrite((char *)gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, f) != 1)
- return 0;
- #endif
-
- ***************
- *** 432,438 ****
- if (offset) *offset += ARTICLE_FIELDS * sizeof(net_long);
- #else
-
- ! if (fread(dh, sizeof(data_header), 1, f) != 1) return 0;
- if (offset) *offset += sizeof(data_header);
- #endif
- return 1;
- --- 432,438 ----
- if (offset) *offset += ARTICLE_FIELDS * sizeof(net_long);
- #else
-
- ! if (fread((char *)dh, sizeof(data_header), 1, f) != 1) return 0;
- if (offset) *offset += sizeof(data_header);
- #endif
- return 1;
- ***************
- *** 462,468 ****
- return 0;
- #else
-
- ! if (fwrite(dh, sizeof(data_header), 1, f) != 1) return 0;
-
- #endif
-
- --- 462,468 ----
- return 0;
- #else
-
- ! if (fwrite((char *)dh, sizeof(data_header), 1, f) != 1) return 0;
-
- #endif
-
-
- *** /usr/storm/nn6.3.0/execute.c Thu Jun 1 11:10:42 1989
- --- execute.c Wed Jul 5 16:52:17 1989
- ***************
- *** 18,24 ****
- sig_type (*quit)(), (*intr)(), (*cont)();
- extern int errno;
-
- ! was_raw = no_raw();
-
- while ((pid = fork()) == -1) sleep(1);
-
- --- 18,24 ----
- sig_type (*quit)(), (*intr)(), (*cont)();
- extern int errno;
-
- ! was_raw = unset_raw();
-
- while ((pid = fork()) == -1) sleep(1);
-
- ***************
- *** 121,127 ****
- {
- int was_raw;
-
- ! was_raw = no_raw();
- gotoxy(0, Lines-1);
- clrline();
-
- --- 121,127 ----
- {
- int was_raw;
-
- ! was_raw = unset_raw();
- gotoxy(0, Lines-1);
- clrline();
-
-
- *** /usr/storm/nn6.3.0/expire.c Thu Jun 1 11:10:42 1989
- --- expire.c Tue Jul 4 18:21:15 1989
- ***************
- *** 15,21 ****
- goto error_handler; \
- }
-
- ! expire_group(gh)
- register group_header *gh;
- {
- FILE *old_x, *old_d;
- --- 15,21 ----
- goto error_handler; \
- }
-
- ! long expire_group(gh)
- register group_header *gh;
- {
- FILE *old_x, *old_d;
-
- *** /usr/storm/nn6.3.2/folder.c Wed Jun 28 20:07:46 1989
- --- folder.c Tue Jul 4 18:11:08 1989
- ***************
- *** 320,326 ****
- }
- closedir(dirp);
- *comp = (char *)0;
- ! qsort((char *)completions, comp - completions, sizeof(char *), sort_directory);
- comp_iterator = completions;
- comp_help = completions;
-
- --- 320,326 ----
- }
- closedir(dirp);
- *comp = (char *)0;
- ! qsort((char *)completions, (unsigned)(comp - completions), sizeof(char *), sort_directory);
- comp_iterator = completions;
- comp_help = completions;
-
- ***************
- *** 527,533 ****
- register int c;
- register long cnt;
- register article_header *ah, **ahp;
- ! register int n;
-
- if ((src = fopen(group_path_name, "r")) == NULL) {
- msg("Cannot open %s", group_path_name);
- --- 527,533 ----
- register int c;
- register long cnt;
- register article_header *ah, **ahp;
- ! register article_number n;
-
- if ((src = fopen(group_path_name, "r")) == NULL) {
- msg("Cannot open %s", group_path_name);
-
- *** /usr/storm/nn6.3.0/global.c Thu Jun 1 11:10:43 1989
- --- global.c Tue Jul 4 21:02:28 1989
- ***************
- *** 58,63 ****
- --- 58,70 ----
- }
- #endif
-
- + /*
- + * who:
- + * 0 nn
- + * 1 nnmaster
- + * 2 nnadmin
- + * 3 nncheck
- + */
-
- init_global(who)
- int who;
- ***************
- *** 84,90 ****
- if (is_master) {
- signal(SIGINT, catch_hangup);
- signal(SIGQUIT, catch_hangup);
- ! return;
- }
-
- signal(SIGINT, catch_keyboard);
- --- 91,97 ----
- if (is_master) {
- signal(SIGINT, catch_hangup);
- signal(SIGQUIT, catch_hangup);
- ! return 0;
- }
-
- signal(SIGINT, catch_keyboard);
- ***************
- *** 98,109 ****
-
- nn_directory = mk_file_name(home_directory, ".nn");
-
- ! if (!file_exist(nn_directory, "drwx"))
- mkdir(nn_directory, 0755); /* should check here */
- !
- if ((env = getenv("TMPDIR")) == NULL) env = TMP_DIRECTORY;
- temp_file = mk_file_name(env, "nn.XXXXXX"); /* dies in ANSI C! */
- mktemp(temp_file);
- }
-
- /*
- --- 105,119 ----
-
- nn_directory = mk_file_name(home_directory, ".nn");
-
- ! if (who != 2 && !file_exist(nn_directory, "drwx")) {
- ! if (who == 3) return -1;
- mkdir(nn_directory, 0755); /* should check here */
- ! }
- !
- if ((env = getenv("TMPDIR")) == NULL) env = TMP_DIRECTORY;
- temp_file = mk_file_name(env, "nn.XXXXXX"); /* dies in ANSI C! */
- mktemp(temp_file);
- + return 0;
- }
-
- /*
- ***************
- *** 369,381 ****
- log_entry(va_alist)
- va_dcl
- {
- ! int type;
- va_list ap;
-
- va_start(ap);
- type = va_arg1(int);
- ! enter_log(type, va_args2toN);
- va_end(ap);
- }
-
- #ifdef HAVE_SYSLOG
- --- 379,392 ----
- log_entry(va_alist)
- va_dcl
- {
- ! int type, rval;
- va_list ap;
-
- va_start(ap);
- type = va_arg1(int);
- ! rval = enter_log(type, va_args2toN);
- va_end(ap);
- + return rval;
- }
-
- #ifdef HAVE_SYSLOG
-
- *** /usr/storm/nn6.3.3/group.c Fri Jun 30 11:30:44 1989
- --- group.c Sat Jul 8 15:05:35 1989
- ***************
- *** 9,15 ****
- #include "menu.h"
- #include "keymap.h"
- #include "regexp.h"
- !
-
- export int dont_split_digests = 0;
- export int dont_sort_articles = 0;
- --- 9,17 ----
- #include "menu.h"
- #include "keymap.h"
- #include "regexp.h"
- ! #ifdef HAVE_SYSLOG
- ! #include <syslog.h>
- ! #endif
-
- export int dont_split_digests = 0;
- export int dont_sort_articles = 0;
- ***************
- *** 150,156 ****
- submask++;
- if (subpattern != NULL) {
- if (strncmp(submask, subptext, 80) != 0) {
- ! free(subpattern);
- subpattern = NULL;
- }
- }
- --- 152,158 ----
- submask++;
- if (subpattern != NULL) {
- if (strncmp(submask, subptext, 80) != 0) {
- ! free((char *)subpattern);
- subpattern = NULL;
- }
- }
- ***************
- *** 162,168 ****
- submask = NULL;
- } else
- if (subpattern != NULL) {
- ! free(subpattern);
- subpattern = NULL;
- }
-
- --- 164,170 ----
- submask = NULL;
- } else
- if (subpattern != NULL) {
- ! free((char *)subpattern);
- subpattern = NULL;
- }
-
- ***************
- *** 287,293 ****
- if ((flags & DONT_SORT_ARTICLES) == 0)
- sort_articles();
-
- ! return n_articles;
- }
-
- static article_number current_first_article;
- --- 289,295 ----
- if ((flags & DONT_SORT_ARTICLES) == 0)
- sort_articles();
-
- ! return n_articles > 0 ? 1 : 0;
- }
-
- static article_number current_first_article;
- ***************
- *** 402,408 ****
- if (submask == NULL && !also_read_articles) {
- if (has_selection(gh, ¤t_first_article, &last_article)) {
- status = access_group(gh, current_first_article, last_article,
- ! DONT_SORT_ARTICLES, (char *)NULL, do_kill);
- do_selections(status >= 0 && n_articles);
- if (status < 0) goto access_exception;
- if (n_articles) {
- --- 404,410 ----
- if (submask == NULL && !also_read_articles) {
- if (has_selection(gh, ¤t_first_article, &last_article)) {
- status = access_group(gh, current_first_article, last_article,
- ! DONT_SORT_ARTICLES, (char *)NULL, 0);
- do_selections(status >= 0 && n_articles);
- if (status < 0) goto access_exception;
- if (n_articles) {
- ***************
- *** 433,443 ****
- access_exception:
-
- if (status < 0) {
- ! if (status == -1)
- msg("DATABASE CORRUPTED FOR GROUP %s", gh->group_name);
- ! /* else
- ! msg("Group %s is blocked - try again later", gh->group_name);
- ! */
- menu_return( ME_NEXT );
- }
-
- --- 435,451 ----
- access_exception:
-
- if (status < 0) {
- ! if (status == -1) {
- ! clrdisp();
- msg("DATABASE CORRUPTED FOR GROUP %s", gh->group_name);
- ! #ifdef HAVE_SYSLOG
- ! openlog("nn", LOG_CONS, LOG_DAEMON);
- ! syslog(LOG_ALERT, "database corrupted for newsgroup %s.",
- ! gh->group_name);
- ! closelog();
- ! #endif
- ! user_delay(5);
- ! }
- menu_return( ME_NEXT );
- }
-
- ***************
- *** 452,462 ****
-
- if (menu_cmd == ME_QUIT || menu_cmd == ME_NEXT || menu_cmd == ME_PREV)
- if (submask == NULL && !no_update)
- ! save_selection(gh, current_first_article, gh->last_l_article);
-
- if (menu_cmd == ME_READ || menu_cmd == ME_NO_ARTICLES) {
- if (did_selection) {
- ! int was_read = gh->group_flag & G_READ;
-
- prev_last = gh->last_l_article;
- gh->last_l_article = last_article;
- --- 460,470 ----
-
- if (menu_cmd == ME_QUIT || menu_cmd == ME_NEXT || menu_cmd == ME_PREV)
- if (submask == NULL && !no_update)
- ! save_selection(gh, current_first_article, gh->last_l_article, 0);
-
- if (menu_cmd == ME_READ || menu_cmd == ME_NO_ARTICLES) {
- if (did_selection) {
- ! int32 was_read = gh->group_flag & G_READ;
-
- prev_last = gh->last_l_article;
- gh->last_l_article = last_article;
- ***************
- *** 855,861 ****
-
- printf("\r%s", cur->group_name); clrline();
-
- ! access_group(cur, -1, cur->last_l_article, access_mode, submask, do_kill);
- }
- merge_memory();
- if (n_articles == 0) return;
- --- 863,869 ----
-
- printf("\r%s", cur->group_name); clrline();
-
- ! access_group(cur, (article_number)(-1), cur->last_l_article, access_mode, submask, do_kill);
- }
- merge_memory();
- if (n_articles == 0) return;
-
- *** /usr/storm/nn6.3.0/help.more Thu Jun 1 11:10:43 1989
- --- help.more Fri Jul 7 11:06:17 1989
- ***************
- *** 7,14 ****
- c compress spaces
- ;:AGOTO ANOTHER ARTICLE;:A
- SP next (at end of current article) ;:ACANCEL, SUBSCRIBE, KILL;:A
- ! n next C cancel article
- ! p previous article U (un)subscribe to group
- k kill subject (not permanently) K kill/select handling
- * select subject
- ;:AQUIT / ESCAPE;:A
- --- 7,14 ----
- c compress spaces
- ;:AGOTO ANOTHER ARTICLE;:A
- SP next (at end of current article) ;:ACANCEL, SUBSCRIBE, KILL;:A
- ! n, p next/previous article C cancel article
- ! l mark article for later action U (un)subscribe to group
- k kill subject (not permanently) K kill/select handling
- * select subject
- ;:AQUIT / ESCAPE;:A
-
- *** /usr/storm/nn6.3.2/init.c Wed Jun 28 20:07:51 1989
- --- init.c Sat Jul 8 00:04:11 1989
- ***************
- *** 581,586 ****
- --- 581,587 ----
-
- clrdisp();
- rm_kill_file();
- + free_kill_entries();
- do_kill_handling = init_kill() && do_kill_handling;
- return AC_REDRAW;
- }
- ***************
- *** 646,652 ****
- }
-
- CASE( "coredump" ) {
- ! no_raw();
- abort();
- }
-
- --- 647,653 ----
- }
-
- CASE( "coredump" ) {
- ! unset_raw();
- abort();
- }
-
-
- *** /usr/storm/nn6.3.3/keymap.c Fri Jun 30 11:30:46 1989
- --- keymap.c Tue Jul 4 19:58:05 1989
- ***************
- *** 317,323 ****
- /* : */ K_EXTENDED_CMD,
- /* ; */ K_UNBOUND,
- /* < */ K_PREV_PAGE,
- ! /* = */ K_UNBOUND,
- /* > */ K_NEXT_PAGE,
- /* ? */ K_HELP,
- /* @ */ K_SELECT_INVERT,
- --- 317,323 ----
- /* : */ K_EXTENDED_CMD,
- /* ; */ K_UNBOUND,
- /* < */ K_PREV_PAGE,
- ! /* = */ K_GOTO_MATCH,
- /* > */ K_NEXT_PAGE,
- /* ? */ K_HELP,
- /* @ */ K_SELECT_INVERT,
- ***************
- *** 422,428 ****
-
- "decode", K_UUDECODE, 0,
-
- ! "find", K_GOTO_MATCH, K_ONLY_MORE,
- "find-next", K_NEXT_MATCH, K_ONLY_MORE,
- "follow", K_FOLLOW_UP, 0,
- "full-digest", K_FULL_DIGEST, K_ONLY_MORE,
- --- 422,428 ----
-
- "decode", K_UUDECODE, 0,
-
- ! "find", K_GOTO_MATCH, 0,
- "find-next", K_NEXT_MATCH, K_ONLY_MORE,
- "follow", K_FOLLOW_UP, 0,
- "full-digest", K_FULL_DIGEST, K_ONLY_MORE,
-
- *** /usr/storm/nn6.3.3/keymap.h Fri Jun 30 11:30:47 1989
- --- keymap.h Thu Jul 6 15:04:13 1989
- ***************
- *** 97,115 ****
- #define K_MACRO 0x0100 /* call macro */
- #define K_ARTICLE_ID 0x0200 /* article id in lower part */
-
- - /* special keys returned by get_c() */
- -
- - #define K_interrupt CTRL('G')
- -
- - #define K_up_arrow 0x0081
- - #define K_down_arrow 0x0082
- - #define K_left_arrow 0x0083
- - #define K_right_arrow 0x0084
- -
- - #define K_function(n) (0x0085 + n)
- -
- -
- - #define GETC_COMMAND 0x4000 /* bit set by get_c to return a command */
-
- /*
- * KEY MAP SIZE is:
- --- 97,102 ----
-
- *** /usr/storm/nn6.3.3/kill.c Fri Jun 30 11:30:48 1989
- --- kill.c Sat Jul 8 00:56:04 1989
- ***************
- *** 11,22 ****
-
- extern char *quick_match();
-
- ! #define COMP_KILL_MAGIC 0x4b694c6c /* KiLl */
-
- /*
- * kill flags
- */
-
- #define AUTO_KILL 0x01
- #define AUTO_SELECT 0x00 /* pseudo flag */
- #define ON_SUBJECT 0x02
- --- 11,24 ----
-
- extern char *quick_match();
-
- ! #define COMP_KILL_MAGIC 0x4b694c6d /* KiLm */
-
- /*
- * kill flags
- */
-
- + #define COMP_KILL_ENTRY 0x80
- +
- #define AUTO_KILL 0x01
- #define AUTO_SELECT 0x00 /* pseudo flag */
- #define ON_SUBJECT 0x02
- ***************
- *** 52,67 ****
- typedef struct kill_list_entry {
- int kill_flag;
- char *kill_pattern;
- struct kill_list_entry *next_kill;
- } kill_list_entry;
-
-
- static kill_list_entry dummy_kill = {
- ! 0, (char *)NULL, (kill_list_entry *)NULL
- };
- static kill_list_entry *global_kill_list = &dummy_kill;
- static kill_list_entry *end_kill_list = &dummy_kill;
- !
-
- kill_article(ah)
- article_header *ah;
- --- 54,72 ----
- typedef struct kill_list_entry {
- int kill_flag;
- char *kill_pattern;
- + regexp *kill_regexp;
- struct kill_list_entry *next_kill;
- } kill_list_entry;
-
- + static kill_list_entry *kill_tab;
- + static char *kill_patterns;
-
- static kill_list_entry dummy_kill = {
- ! 0, (char *)NULL, (regexp *)NULL, (kill_list_entry *)NULL
- };
- static kill_list_entry *global_kill_list = &dummy_kill;
- static kill_list_entry *end_kill_list = &dummy_kill;
- ! static kill_list_entry latest_kl_entry;
-
- kill_article(ah)
- article_header *ah;
- ***************
- *** 83,89 ****
- continue;
- } else
- if (kl->kill_flag & KILL_ON_REGEXP) {
- ! if (regexec((regexp *)(kl->kill_pattern), string) == 0)
- continue;
- } else
- if (quick_match(string, kl->kill_pattern) == NULL)
- --- 88,94 ----
- continue;
- } else
- if (kl->kill_flag & KILL_ON_REGEXP) {
- ! if (regexec(kl->kill_regexp, string) == 0)
- continue;
- } else
- if (quick_match(string, kl->kill_pattern) == NULL)
- ***************
- *** 91,98 ****
-
- if (kl->kill_flag & AUTO_KILL)
- return 1;
- !
- ! ah->flag |= A_SELECT;
- break;
- }
-
- --- 96,103 ----
-
- if (kl->kill_flag & AUTO_KILL)
- return 1;
- !
- ! ah->flag |= A_SELECT | A_AUTO;
- break;
- }
-
- ***************
- *** 100,119 ****
- }
-
-
- ! auto_select_article(ah)
- article_header *ah;
- {
- register kill_list_entry *kl;
- char *string;
- !
- ! end_kill_list->next_kill = ah->a_group ?
- ! (kill_list_entry *)(ah->a_group->kill_list) :
- ! (kill_list_entry *)(current_group->kill_list);
-
- - kl = global_kill_list;
- while (kl = kl->next_kill) {
- ! if (kl->kill_flag & AUTO_KILL) continue;
- !
- if (kl->kill_flag & ON_SUBJECT)
- string = ah->subject;
- else
- --- 105,135 ----
- }
-
-
- ! auto_select_article(ah, do_select)
- article_header *ah;
- + int do_select;
- {
- register kill_list_entry *kl;
- + kill_list_entry kl_head;
- char *string;
- !
- ! if (do_select == 2) {
- ! kl = &kl_head;
- ! kl->next_kill = &latest_kl_entry;
- ! } else {
- ! end_kill_list->next_kill = ah->a_group ?
- ! (kill_list_entry *)(ah->a_group->kill_list) :
- ! (kill_list_entry *)(current_group->kill_list);
- ! kl = global_kill_list;
- ! }
-
- while (kl = kl->next_kill) {
- ! if (do_select) {
- ! if (kl->kill_flag & AUTO_KILL) continue;
- ! } else {
- ! if ((kl->kill_flag & AUTO_KILL) == 0) continue;
- ! }
- ! check_one:
- if (kl->kill_flag & ON_SUBJECT)
- string = ah->subject;
- else
- ***************
- *** 124,130 ****
- continue;
- } else
- if (kl->kill_flag & KILL_ON_REGEXP) {
- ! if (regexec((regexp *)(kl->kill_pattern), string) == 0)
- continue;
- } else
- if (quick_match(string, kl->kill_pattern) == NULL)
- --- 140,146 ----
- continue;
- } else
- if (kl->kill_flag & KILL_ON_REGEXP) {
- ! if (regexec(kl->kill_regexp, string) == 0)
- continue;
- } else
- if (quick_match(string, kl->kill_pattern) == NULL)
- ***************
- *** 148,164 ****
- time_t now;
- FILE *killf;
- register kill_list_entry *kl;
- char *str;
-
- if (flag & KILL_ON_REGEXP) {
- ! str = (char *)regcomp(pattern);
- ! if (str == NULL) return;
- } else {
- ! str = malloc(strlen(pattern) + 1);
- ! mem_check(str, 1, "string");
- !
- ! strcpy(str, pattern);
- !
- if ((flag & KILL_MUST_MATCH) == 0)
- init_quick_match(str);
- }
- --- 164,179 ----
- time_t now;
- FILE *killf;
- register kill_list_entry *kl;
- + regexp *re;
- char *str;
-
- + str = copy_str(pattern);
- +
- if (flag & KILL_ON_REGEXP) {
- ! re = regcomp(pattern);
- ! if (re == NULL) return;
- } else {
- ! re = NULL;
- if ((flag & KILL_MUST_MATCH) == 0)
- init_quick_match(str);
- }
- ***************
- *** 191,200 ****
- rm_kill_file();
-
- kl = (kill_list_entry *)calloc(1, sizeof(kill_list_entry));
- ! mem_check(kl, 1, "kill list entry");
-
- ! kl->kill_pattern = str;
- ! kl->kill_flag = flag;
-
- if (gh) {
- kl->next_kill = (kill_list_entry *)(gh->kill_list);
- --- 206,217 ----
- rm_kill_file();
-
- kl = (kill_list_entry *)calloc(1, sizeof(kill_list_entry));
- ! mem_check((char *)kl, 1, "kill list entry");
-
- ! latest_kl_entry.kill_pattern = kl->kill_pattern = str;
- ! latest_kl_entry.kill_regexp = kl->kill_regexp = re;
- ! latest_kl_entry.kill_flag = kl->kill_flag = flag;
- ! latest_kl_entry.next_kill = NULL;
-
- if (gh) {
- kl->next_kill = (kill_list_entry *)(gh->kill_list);
- ***************
- *** 236,242 ****
- case NL:
- if (ah == NULL) {
- ah = get_menu_article();
- ! if (ah == NULL) return;
- }
-
- strcpy(buffer, ah->subject);
- --- 253,259 ----
- case NL:
- if (ah == NULL) {
- ah = get_menu_article();
- ! if (ah == NULL) return -1;
- }
-
- strcpy(buffer, ah->subject);
- ***************
- *** 243,249 ****
- enter_kill_file(current_group, buffer,
- AUTO_KILL | ON_SUBJECT | KILL_MUST_MATCH, 30);
- msg("DONE");
- ! return;
-
- case 'k':
- case 'K':
- --- 260,266 ----
- enter_kill_file(current_group, buffer,
- AUTO_KILL | ON_SUBJECT | KILL_MUST_MATCH, 30);
- msg("DONE");
- ! return 1;
-
- case 'k':
- case 'K':
- ***************
- *** 258,264 ****
- mode1 = "SELECT";
- break;
- default:
- ! return;
- }
-
- prompt("\1AUTO %s\1 on (S)ubject or (N)ame ?", mode1);
- --- 275,281 ----
- mode1 = "SELECT";
- break;
- default:
- ! return -1;
- }
-
- prompt("\1AUTO %s\1 on (S)ubject or (N)ame ?", mode1);
- ***************
- *** 281,298 ****
- mode2 = "Subject";
- break;
- default:
- ! return;
- }
-
- prompt("\1%s %s:\1", mode1, mode2);
-
- pattern = get_s(dflt, NONE, "%=/", NO_COMPLETION);
- ! if (pattern == NULL) return;
- if (*pattern == NUL || *pattern == '%' || *pattern == '=') {
- if (dflt && *dflt)
- pattern = dflt;
- else {
- ! if ((ah = get_menu_article()) == NULL) return;
- pattern = (flag & ON_SUBJECT) ? ah->subject : ah->sender;
- }
- flag |= KILL_MUST_MATCH;
- --- 298,315 ----
- mode2 = "Subject";
- break;
- default:
- ! return -1;
- }
-
- prompt("\1%s %s:\1", mode1, mode2);
-
- pattern = get_s(dflt, NONE, "%=/", NO_COMPLETION);
- ! if (pattern == NULL) return -1;
- if (*pattern == NUL || *pattern == '%' || *pattern == '=') {
- if (dflt && *dflt)
- pattern = dflt;
- else {
- ! if ((ah = get_menu_article()) == NULL) return -1;
- pattern = (flag & ON_SUBJECT) ? ah->subject : ah->sender;
- }
- flag |= KILL_MUST_MATCH;
- ***************
- *** 301,307 ****
- prompt("\1%s %s\1 (regexp): ", mode1, mode2);
-
- pattern = get_s(NONE, NONE, NONE, NO_COMPLETION);
- ! if (pattern == NULL || *pattern == NUL) return;
- flag |= KILL_ON_REGEXP;
- }
-
- --- 318,324 ----
- prompt("\1%s %s\1 (regexp): ", mode1, mode2);
-
- pattern = get_s(NONE, NONE, NONE, NO_COMPLETION);
- ! if (pattern == NULL || *pattern == NUL) return -1;
- flag |= KILL_ON_REGEXP;
- }
-
- ***************
- *** 324,335 ****
- gh = NULL;
- break;
- default:
- ! return;
- }
-
- prompt("\1Lifetime of entry in days\1 (P)ermanent ");
- days_str = get_s(" 30 days", NONE, "pP", NO_COMPLETION);
- ! if (days_str == NULL) return;
-
- if (*days_str == NUL) {
- days_str = "30 days";
- --- 341,352 ----
- gh = NULL;
- break;
- default:
- ! return -1;
- }
-
- prompt("\1Lifetime of entry in days\1 (P)ermanent ");
- days_str = get_s(" 30 days", NONE, "pP", NO_COMPLETION);
- ! if (days_str == NULL) return -1;
-
- if (*days_str == NUL) {
- days_str = "30 days";
- ***************
- *** 342,348 ****
- sprintf(days_str, "%d days", days);
- } else {
- ding();
- ! return;
- }
-
- prompt("\1CONFIRM\1 %s %s %s%s: %-.35s%s ",
- --- 359,365 ----
- sprintf(days_str, "%d days", days);
- } else {
- ding();
- ! return -1;
- }
-
- prompt("\1CONFIRM\1 %s %s %s%s: %-.35s%s ",
- ***************
- *** 350,358 ****
- (flag & KILL_MUST_MATCH) ? " exact" :
- (flag & KILL_ON_REGEXP) ? " regexp" : "",
- pattern, strlen(pattern) > 35 ? "..." : "");
- ! if (yes(0) <= 0) return;
-
- enter_kill_file(gh, pattern, flag, days);
- }
-
-
- --- 367,377 ----
- (flag & KILL_MUST_MATCH) ? " exact" :
- (flag & KILL_ON_REGEXP) ? " regexp" : "",
- pattern, strlen(pattern) > 35 ? "..." : "");
- ! if (yes(0) <= 0) return -1;
-
- enter_kill_file(gh, pattern, flag, days);
- +
- + return (flag & AUTO_KILL) ? 1 : 0;
- }
-
-
- ***************
- *** 363,374 ****
- FILE *killf;
- comp_kill_header header;
- comp_kill_entry entry;
- - kill_list_entry *kill_tab;
- register group_header *gh;
- register kill_list_entry *kl;
- - char *patterns;
- time_t kill_age, comp_age;
- ! register n;
-
- Loop_Groups_Header(gh)
- gh->kill_list = NULL;
- --- 382,393 ----
- FILE *killf;
- comp_kill_header header;
- comp_kill_entry entry;
- register group_header *gh;
- register kill_list_entry *kl;
- time_t kill_age, comp_age;
- ! register long n;
- ! int first_try = 1;
- ! import char *delayed_msg;
-
- Loop_Groups_Header(gh)
- gh->kill_list = NULL;
- ***************
- *** 377,405 ****
- if (kill_age == 0) return 0;
-
- comp_age = file_exist(relative(nn_directory, COMPILED_KILL), "fr");
- if (comp_age < kill_age && !compile_kill_file()) return 0;
- !
- killf = open_file(relative(nn_directory, COMPILED_KILL), OPEN_READ);
- if (killf == NULL) return 0;
-
- ! if (fread(&header, sizeof(header), 1, killf) != 1) goto err;
- if (header.ckh_magic != COMP_KILL_MAGIC) goto err;
-
- ! patterns = malloc(header.ckh_pattern_size);
- ! mem_check(patterns, header.ckh_pattern_size, "kill bytes");
-
- kill_tab = (kill_list_entry *)
- ! calloc(header.ckh_entries, sizeof(kill_list_entry));
- ! mem_check(kill_tab, header.ckh_entries, "kill entries");
- !
- for (n = header.ckh_entries, kl = kill_tab; --n >= 0; kl++) {
- ! if (fread(&entry, sizeof(entry), 1, killf) != 1) goto err;
-
- ! kl->kill_pattern = patterns + entry.ck_pattern_index;
- kl->kill_flag = entry.ck_flag;
-
- ! if (kl->kill_flag & KILL_ON_REGEXP)
- ! kl->kill_pattern = (char *)regcomp(kl->kill_pattern);
-
- if (entry.ck_group >= 0) {
- gh = active_groups + entry.ck_group;
- --- 396,437 ----
- if (kill_age == 0) return 0;
-
- comp_age = file_exist(relative(nn_directory, COMPILED_KILL), "fr");
- + again:
- if (comp_age < kill_age && !compile_kill_file()) return 0;
- !
- ! kill_tab = NULL;
- ! kill_patterns = NULL;
- !
- killf = open_file(relative(nn_directory, COMPILED_KILL), OPEN_READ);
- if (killf == NULL) return 0;
-
- ! if (fread((char *)&header, sizeof(header), 1, killf) != 1) goto err;
- if (header.ckh_magic != COMP_KILL_MAGIC) goto err;
-
- ! kill_patterns = malloc((unsigned)header.ckh_pattern_size);
- ! mem_check(kill_patterns, (int)header.ckh_pattern_size, "kill bytes");
-
- kill_tab = (kill_list_entry *)
- ! calloc((unsigned)header.ckh_entries, sizeof(kill_list_entry));
- ! mem_check((char *)kill_tab, (int)header.ckh_entries, "kill entries");
- !
- ! fseek(killf, (off_t)(header.ckh_entries * sizeof(entry)), 1);
- ! if (fread(kill_patterns, sizeof(char), (int)header.ckh_pattern_size, killf)
- ! != header.ckh_pattern_size) goto err;
- !
- ! fseek(killf, (off_t)sizeof(header), 0);
- for (n = header.ckh_entries, kl = kill_tab; --n >= 0; kl++) {
- ! if (fread((char *)&entry, sizeof(entry), 1, killf) != 1) goto err;
- ! if (header.ckh_pattern_size <= entry.ck_pattern_index ||
- ! entry.ck_pattern_index < 0) goto err;
-
- ! kl->kill_pattern = kill_patterns + entry.ck_pattern_index;
- kl->kill_flag = entry.ck_flag;
-
- ! if (kl->kill_flag & KILL_ON_REGEXP)
- ! kl->kill_regexp = regcomp(kl->kill_pattern);
- ! else
- ! kl->kill_regexp = NULL;
-
- if (entry.ck_group >= 0) {
- gh = active_groups + entry.ck_group;
- ***************
- *** 412,428 ****
- }
- }
-
- - if (fread(patterns, sizeof(char), header.ckh_pattern_size, killf)
- - != header.ckh_pattern_size) goto err;
- -
- fclose(killf);
-
- return 1;
-
- err:
- fclose(killf);
- - msg("Error in compiled kill file");
- rm_kill_file();
-
- Loop_Groups_Header(gh)
- gh->kill_list = NULL;
- --- 444,466 ----
- }
- }
-
- fclose(killf);
-
- return 1;
-
- err:
- + if (kill_patterns != NULL) free(kill_patterns);
- + if (kill_tab != NULL) free(kill_tab);
- +
- fclose(killf);
- rm_kill_file();
- + if (first_try) {
- + first_try = 0;
- + comp_age = 0;
- + goto again;
- + }
- +
- + delayed_msg = "Error in compiled kill file (ignored)";
-
- Loop_Groups_Header(gh)
- gh->kill_list = NULL;
- ***************
- *** 509,515 ****
- /* flags */
-
- cp = np;
- ! flag = 0;
-
- for (;;) {
- switch (*cp++) {
- --- 547,553 ----
- /* flags */
-
- cp = np;
- ! flag = COMP_KILL_ENTRY;
-
- for (;;) {
- switch (*cp++) {
- ***************
- *** 579,585 ****
-
- header.ckh_magic = COMP_KILL_MAGIC;
-
- ! if (fwrite(&header, sizeof(header), 1, compf) != 1)
- goto err2;
-
- fclose(compf);
- --- 617,623 ----
-
- header.ckh_magic = COMP_KILL_MAGIC;
-
- ! if (fwrite((char *)&header, sizeof(header), 1, compf) != 1)
- goto err2;
-
- fclose(compf);
- ***************
- *** 629,634 ****
- --- 667,706 ----
- }
-
-
- + free_kill_entries()
- + {
- + register group_header *gh;
- +
- + Loop_Groups_Header(gh)
- + if (gh->kill_list) {
- + free_kill_list((kill_list_entry *)(gh->kill_list));
- + gh->kill_list = NULL;
- + }
- +
- + end_kill_list->next_kill = NULL;
- + free_kill_list(global_kill_list->next_kill);
- +
- + end_kill_list = global_kill_list = &dummy_kill;
- +
- + if (kill_patterns != NULL) free(kill_patterns);
- + if (kill_tab != NULL) free(kill_tab);
- + }
- +
- + static free_kill_list(kl)
- + register kill_list_entry *kl;
- + {
- + register kill_list_entry *nxt;
- + while (kl) {
- + nxt = kl->next_kill;
- + if (kl->kill_regexp != NULL) free(kl->kill_regexp);
- + if ((kl->kill_flag & COMP_KILL_ENTRY) == 0) {
- + if (kl->kill_pattern != NULL) free(kl->kill_pattern);
- + free(kl);
- + }
- + kl = nxt;
- + }
- + }
- +
- dump_kill_list()
- {
- register kill_list_entry *kl;
- ***************
- *** 646,654 ****
-
- if (pg_next() < 0) goto out;
- if (pg_next() < 0) goto out;
- so_printf("\1GROUP %s kill list entries\1", current_group->group_name);
-
- - kl = (kill_list_entry *)(current_group->kill_list);
- while (kl) {
- if (print_kill(kl) < 0) break;
- kl = kl->next_kill;
- --- 718,731 ----
-
- if (pg_next() < 0) goto out;
- if (pg_next() < 0) goto out;
- +
- + kl = (kill_list_entry *)(current_group->kill_list);
- + if (kl == NULL) {
- + printf("No kill entries for %s", current_group->group_name);
- + goto out;
- + }
- so_printf("\1GROUP %s kill list entries\1", current_group->group_name);
-
- while (kl) {
- if (print_kill(kl) < 0) break;
- kl = kl->next_kill;
- ***************
- *** 669,676 ****
- printf("\r%s ON %s '%.35s'%s\n",
- kl->kill_flag & AUTO_KILL ? "KILL" : "SELECT",
- kl->kill_flag & ON_SUBJECT ? "SUBJECT" : "NAME",
- ! kl->kill_flag & KILL_ON_REGEXP ? "*regexp*" : kl->kill_pattern,
- ! kl->kill_flag & KILL_MUST_MATCH ? " (exact)" : "");
-
- return 0;
- }
- --- 746,754 ----
- printf("\r%s ON %s '%.35s'%s\n",
- kl->kill_flag & AUTO_KILL ? "KILL" : "SELECT",
- kl->kill_flag & ON_SUBJECT ? "SUBJECT" : "NAME",
- ! kl->kill_pattern,
- ! kl->kill_flag & KILL_MUST_MATCH ? " (exact)" :
- ! kl->kill_flag & KILL_ON_REGEXP ? " (re)" : "");
-
- return 0;
- }
-
- *** /usr/storm/nn6.3.2/MANIFEST Wed Jun 28 20:07:53 1989
- --- MANIFEST Mon Jul 10 13:24:25 1989
- ***************
- *** 47,61 ****
- --- 47,66 ----
- kill.c
- log_entry.c
- m-att3b.h
- + m-convex.h
- m-dec3100.h
- m-gould.h
- m-hp9000.h
- + m-i80286.h
- m-m680x0.h
- + m-sgi4D.h
- m-sparc.h
- m-sun.h
- m-sun386i.h
- + m-symmetry.h
- m-template.h
- m-vax.h
- + m-xenix386.h
- macro.c
- master.c
- match.c
- ***************
- *** 95,111 ****
- --- 100,122 ----
- regexp.h
- reroute.c
- routes.sample
- + s-aux1-1.h
- s-bsd4-2.h
- s-bsd4-3.h
- s-dnix5-2.h
- + s-dynix3-0.h
- + s-fortune.h
- s-hpux.h
- s-hpux2-1.h
- s-hpux3-0.h
- + s-sgi4D.h
- s-sunos3.h
- s-sunos4-0.h
- s-template.h
- s-tower32.h
- + s-uport2-2.h
- s-usg3-1.h
- + s-xenix386.h
- save.c
- selection.c
- sequence.c
-
- *** /usr/storm/nn6.3.0/macro.c Thu Jun 1 11:10:46 1989
- --- macro.c Wed Jul 5 16:52:14 1989
- ***************
- *** 76,82 ****
- struct macro *m1;
-
- m1 = (struct macro *)calloc(1, sizeof(struct macro));
- ! mem_check(m1, sizeof(struct macro), "for macro");
-
- if (m == NULL)
- m = macro[cur_m] = m1;
- --- 76,82 ----
- struct macro *m1;
-
- m1 = (struct macro *)calloc(1, sizeof(struct macro));
- ! mem_check((char *)m1, sizeof(struct macro), "for macro");
-
- if (m == NULL)
- m = macro[cur_m] = m1;
- ***************
- *** 123,129 ****
- if (f == NULL) {
- clrdisp();
- printf("DEFINE MACRO %d -- END WITH 'end'\n\n\r", cur_m);
- ! no_raw();
- f = stdin;
- }
-
- --- 123,129 ----
- if (f == NULL) {
- clrdisp();
- printf("DEFINE MACRO %d -- END WITH 'end'\n\n\r", cur_m);
- ! unset_raw();
- f = stdin;
- }
-
-
- *** /usr/storm/nn6.3.0/nnmaster.1m Thu Jun 1 11:10:58 1989
- --- nnmaster.1m Fri Jul 7 16:18:03 1989
- ***************
- *** 16,21 ****
- --- 16,23 ----
- .B nnmaster
- [ \-\fBr [ \fP\fIN\fP ] ]
- [ \-\fBe\fP\fIN\fP ]
- + [ \-\fBy\fP\fIN\fP ]
- + [ \-\fBf\fP ]
- [ \-\fBC\fP ]
- [ \-\fBE\fP ]
- [ \-\fBu\fP ]
- ***************
- *** 60,66 ****
- .TP
- \-\fBr\fP [ \fImin\fP ]
- .br
- ! Daemon mode. The \fInnmaster\fP will put itself in the background,
- and will checks for arrival of new articles and expired articles every
- .I min
- minutes (and update the database accordingly). If
- --- 62,69 ----
- .TP
- \-\fBr\fP [ \fImin\fP ]
- .br
- ! Daemon mode. The \fInnmaster\fP will put itself in the background
- ! (unless \-\fBf\fP is also specified),
- and will checks for arrival of new articles and expired articles every
- .I min
- minutes (and update the database accordingly). If
- ***************
- *** 80,85 ****
- --- 83,92 ----
- I cannot recommend this unless you receive batched news; invoking
- \fInnmaster\fP for every received article sounds too expensive to me.)
- .TP
- + .B \-f
- + Run \fInnmaster\fP in foreground in daemon mode (see \-\fBr\fP).
- + Useful if \fInnmaster\fP is invoked from inittab.
- + .TP
- \-\fBe\fP \fIart\fP
- .br
- Run internal
- ***************
- *** 102,107 ****
- --- 109,122 ----
- expired articles on tape.) You can then use the Expire command in
- \fInnadmin\fP(1M) to instruct the \fInnmaster\fP to expire individual
- or all groups.
- + .TP
- + \-\fBy\fP \fIretries\fP
- + .br
- + In some networked environment, opening an article (shared from another
- + machine via NFS) may fail for no obvious reason. Using this option,
- + it is possible to cause
- + \fInnmaster\fP to perform \fIretries\fP attempts to open an article
- + before marking the article as non-existing in the database.
- .TP
- .B \-C
- Perform a consistency check on the database on start-up, and rebuild
-
- *** /usr/storm/nn6.3.3/master.c Fri Jun 30 11:30:51 1989
- --- master.c Mon Jul 10 12:30:48 1989
- ***************
- *** 14,19 ****
- --- 14,22 ----
- *
- * -e N expire a group if more than N articles are gone
- * -r N repeat every N minutes
- +
- + * -f foreground execution (use with -r)
- + * -y N retry N times on error
- *
- * -E expire by recolleting entire groups rather than copying files
- * -C check consistency of database on start-up
- ***************
- *** 37,44 ****
- --- 40,51 ----
- clean_to_expire = 0,
- check_on_startup = 0,
- repeat_delay = 0,
- + foreground = 0,
- debug_mode = 0;
-
- + import int
- + retry_on_error;
- +
- export int
- trace = 0,
- #ifdef NNTP
- ***************
- *** 57,62 ****
- --- 64,72 ----
- 'e', Int_Option( expire_level ),
- 'r', Int_Option_Optional( repeat_delay, 10 ),
-
- + 'f', Bool_Option( foreground ),
- + 'y', Int_Option( retry_on_error ),
- +
- 'E', Bool_Option( clean_to_expire ),
- 'C', Bool_Option( check_on_startup ),
-
- ***************
- *** 72,77 ****
- --- 82,90 ----
-
- static int rm_mpid_on_exit = 0;
-
- + extern long collect_group();
- + extern long expire_group();
- +
- main(argc, argv)
- int argc;
- char **argv;
- ***************
- *** 81,87 ****
- register int cur_group;
- int col_article_count, col_group_count;
- int exp_article_count, exp_group_count;
- ! int temp;
- time_t start_time;
- FILE *m_pid;
-
- --- 94,100 ----
- register int cur_group;
- int col_article_count, col_group_count;
- int exp_article_count, exp_group_count;
- ! long temp;
- time_t start_time;
- FILE *m_pid;
-
- ***************
- *** 119,127 ****
- close(0);
- close(1);
- close(2);
- }
-
- ! if (repeat_delay && !debug_mode) {
- while ((temp = fork()) < 0) sleep(1);
- if (temp) nn_exit(0);
-
- --- 132,141 ----
- close(0);
- close(1);
- close(2);
- + if (open("/dev/null", 2) == 0) dup(0), dup(0);
- }
-
- ! if (repeat_delay && !debug_mode && !foreground) {
- while ((temp = fork()) < 0) sleep(1);
- if (temp) nn_exit(0);
-
- ***************
- *** 216,226 ****
-
- gh = &active_groups[cur_group];
-
- - if (gh->group_flag & G_NO_DIRECTORY) {
- - if (gh->group_flag & G_BLOCKED) goto unblock_group;
- - continue;
- - }
- -
- if (gh->last_l_article > gh->last_article ||
- gh->first_l_article > gh->first_article) {
- log_entry('X', "group %s renumbered", gh->group_name);
- --- 230,235 ----
- ***************
- *** 250,262 ****
-
- do_collect:
- if (!init_group(gh)) {
- ! log_entry('R', "%s: no directory", gh->group_name);
- ! gh->group_flag |= G_NO_DIRECTORY;
- gh->group_flag &= ~(G_EXPIRE | G_BLOCKED);
- save_group(current_group);
- continue;
- }
-
- if (gh->group_flag & G_EXPIRE) {
- if (clean_to_expire) {
- temp = gh->first_article - gh->first_l_article;
- --- 259,281 ----
-
- do_collect:
- if (!init_group(gh)) {
- ! if ((gh->group_flag & G_NO_DIRECTORY) == 0) {
- ! log_entry('R', "%s: no directory", gh->group_name);
- ! gh->group_flag |= G_NO_DIRECTORY;
- ! }
- ! gh->last_l_article = gh->last_article;
- ! gh->first_l_article = gh->last_article; /* OBS: not first */
- gh->group_flag &= ~(G_EXPIRE | G_BLOCKED);
- save_group(current_group);
- continue;
- }
-
- + if (gh->group_flag & G_NO_DIRECTORY) {
- + /* The directory has been created now */
- + gh->group_flag &= ~G_NO_DIRECTORY;
- + clean_group(gh);
- + }
- +
- if (gh->group_flag & G_EXPIRE) {
- if (clean_to_expire) {
- temp = gh->first_article - gh->first_l_article;
- ***************
- *** 412,418 ****
- save_group(gh)
- group_header *gh;
- {
- ! int flag;
-
- flag = gh->group_flag;
- gh->group_flag &= G_MASTER_FLAGS;
- --- 431,437 ----
- save_group(gh)
- group_header *gh;
- {
- ! int32 flag;
-
- flag = gh->group_flag;
- gh->group_flag &= G_MASTER_FLAGS;
- ***************
- *** 534,540 ****
-
- open_master(OPEN_CREATE);
-
- ! fseek(master_file, sizeof(master), 0);
-
- master.number_of_groups = 0;
-
- --- 553,559 ----
-
- open_master(OPEN_CREATE);
-
- ! fseek(master_file, (off_t)sizeof(master), 0);
-
- master.number_of_groups = 0;
-
- ***************
- *** 546,557 ****
- groupname[group.group_name_length] = NUL;
- group.group_name = groupname;
-
- init_group(&group);
-
- clean_group(&group);
-
- - group.group_flag = 0;
- -
- /* moderation flag will be set by first visit_active_file call */
-
- if (strcmp(groupname, "control") == 0)
- --- 565,576 ----
- groupname[group.group_name_length] = NUL;
- group.group_name = groupname;
-
- + group.group_flag = 0;
- +
- init_group(&group);
-
- clean_group(&group);
-
- /* moderation flag will be set by first visit_active_file call */
-
- if (strcmp(groupname, "control") == 0)
- ***************
- *** 649,655 ****
- visit_active_file(); /* just in case */
- Loop_Groups_Header(gh) {
- if (gh->first_l_article + arg2 < gh->first_article) {
- ! gh->group_flag |= G_EXPIRE;
- save_group(gh); /* could block here */
- }
- }
- --- 668,674 ----
- visit_active_file(); /* just in case */
- Loop_Groups_Header(gh) {
- if (gh->first_l_article + arg2 < gh->first_article) {
- ! gh->group_flag |= G_EXPIRE | G_BLOCKED;
- save_group(gh); /* could block here */
- }
- }
- ***************
- *** 661,667 ****
- continue;
-
- case 'C': /* clear flag */
- ! gh->group_flag |= arg2;
- save_group(gh);
- continue;
-
- --- 680,686 ----
- continue;
-
- case 'C': /* clear flag */
- ! gh->group_flag &= ~arg2;
- save_group(gh);
- continue;
-
-
- *** /usr/storm/nn6.3.3/menu.c Fri Jun 30 11:30:53 1989
- --- menu.c Sat Jul 8 19:28:08 1989
- ***************
- *** 7,12 ****
- --- 7,13 ----
- #include "term.h"
- #include "keymap.h"
- #include "menu.h"
- + #include "regexp.h"
-
-
- export int preview_window = 0; /* size of preview window */
- ***************
- *** 17,22 ****
- --- 18,24 ----
- export int delay_redraw = 0; /* prompt again if :-command clears screen */
-
- export char *delayed_msg = NULL; /* give to msg() after redraw */
- + export long dl_msg_arg = 0; /* optional arg to delayed_msg */
-
- import also_read_articles;
- import merged_menu;
- ***************
- *** 23,31 ****
-
- extern group_completion();
-
- static int firstl; /* first menu line */
-
- ! static int firsta; /* first article on menu (0 based) */
- static int cura; /* current article */
- static int next_cura; /* article to become cura if >= 0 */
- static int numa; /* no of articles on menu - 1 */
- --- 25,35 ----
-
- extern group_completion();
-
- + static regexp *regular_expr = NULL;
- +
- static int firstl; /* first menu line */
-
- ! static article_number firsta; /* first article on menu (0 based) */
- static int cura; /* current article */
- static int next_cura; /* article to become cura if >= 0 */
- static int numa; /* no of articles on menu - 1 */
- ***************
- *** 45,50 ****
- --- 49,55 ----
- #define SAVED 4
- #define REMOVE 5
- #define CANCEL 6
- + #define ON_LEAVE 7
-
- static int how;
-
- ***************
- *** 74,84 ****
- how = OFF;
- goto toggle;
- }
- ah->flag |= A_SELECT;
- break;
-
- case OFF:
- ! ah->flag &= ~A_SELECT;
- break;
-
- case INIT:
- --- 79,90 ----
- how = OFF;
- goto toggle;
- }
- + ah->flag &= ~(A_LEAVE | A_READ);
- ah->flag |= A_SELECT;
- break;
-
- case OFF:
- ! ah->flag &= ~(A_SELECT | A_AUTO);
- break;
-
- case INIT:
- ***************
- *** 99,111 ****
- return;
-
- case CANCEL:
- ! gotoxy(1, lno);
- ! if (ah->flag & A_SELECT) {
- ! ah->flag &= ~A_SELECT;
- break;
- }
- putchar((ah->flag & A_CANCEL) ? '#' : ' ');
- return;
- }
-
- if (cura < 0 || cura > numa) return;
- --- 105,126 ----
- return;
-
- case CANCEL:
- ! if (must_print && (ah->flag & A_SELECT)) {
- ! ah->flag &= ~(A_SELECT | A_AUTO);
- break;
- }
- + ah->flag &= ~(A_SELECT | A_AUTO | A_LEAVE | A_LEAVE_NEXT | A_READ);
- + gotoxy(1, lno);
- putchar((ah->flag & A_CANCEL) ? '#' : ' ');
- return;
- +
- + case ON_LEAVE:
- + if (cura < 0 || cura > numa) return;
- + gotoxy(1, lno);
- + putchar((ah->flag & A_LEAVE) ? '+' :
- + (ah->flag & A_LEAVE_NEXT) ? '=' : ' ');
- + return;
- +
- }
-
- if (cura < 0 || cura > numa) return;
- ***************
- *** 124,132 ****
-
- if (fmt_linenum > 4) fmt_linenum = 1;
-
- ! if (ah->flag & A_CANCEL) {
- gotoxy(1, lno);
- ! putchar('#');
- } else
- if (how == ON) {
- if (so_gotoxy(1, lno, 1) == 0) putchar('*');
- --- 139,152 ----
-
- if (fmt_linenum > 4) fmt_linenum = 1;
-
- ! if (ah->flag & (A_CANCEL | A_LEAVE | A_LEAVE_NEXT | A_READ)) {
- gotoxy(1, lno);
- ! putchar(
- ! (ah->flag & A_READ) ? '.' :
- ! (ah->flag & A_LEAVE) ? '+' :
- ! (ah->flag & A_CANCEL) ? '#' :
- ! '='
- ! );
- } else
- if (how == ON) {
- if (so_gotoxy(1, lno, 1) == 0) putchar('*');
- ***************
- *** 187,196 ****
- so_printf(ah->lines >= 0 ? " +%d" : " +?", ah->lines);
-
- so_end();
- ! } else
- putchar((how == OFF) ? ' ' : '*');
- !
- ! fl;
-
- return;
- }
- --- 207,216 ----
- so_printf(ah->lines >= 0 ? " +%d" : " +?", ah->lines);
-
- so_end();
- ! } else {
- ! gotoxy(1, lno);
- putchar((how == OFF) ? ' ' : '*');
- ! }
-
- return;
- }
- ***************
- *** 273,284 ****
- {
- register k_cmd, cur_k_cmd;
- register article_header *ah;
- ! int last_k_cmd, last_how, was_selected;
- int seen_all, menu_cmd, temp;
- ! int save_selected, last_save;
- int doing_unshar, did_unshar;
- char *fname, *savemode, *init_save();
- ! int nexta; /* first article on next menu */
- int maxa; /* max no of articles per menu page */
- int o_firsta, o_mode; /* for recursive calls */
- static menu_level = 0;
- --- 293,305 ----
- {
- register k_cmd, cur_k_cmd;
- register article_header *ah;
- ! int last_k_cmd, last_how;
- int seen_all, menu_cmd, temp;
- ! int save_selected;
- ! article_number last_save;
- int doing_unshar, did_unshar;
- char *fname, *savemode, *init_save();
- ! article_number nexta; /* first article on next menu */
- int maxa; /* max no of articles per menu page */
- int o_firsta, o_mode; /* for recursive calls */
- static menu_level = 0;
- ***************
- *** 285,290 ****
- --- 306,312 ----
- char purpose[80], pr_fmt[60];
- extern int enable_stop, file_completion();
- extern int alt_cmd_key, in_menu_mode, slow_mode, any_message;
- + article_number elim_list[3];
-
- #define menu_return(cmd) \
- { menu_cmd = (cmd); goto menu_exit; }
- ***************
- *** 373,379 ****
- REDRAW_CHECK;
-
- how = INIT;
- ! mark(); fl;
-
- if (s_keyboard) { /* Signal may have corrupted output. */
- if (cura == 0)
- --- 395,401 ----
- REDRAW_CHECK;
-
- how = INIT;
- ! mark(); /* fl; */
-
- if (s_keyboard) { /* Signal may have corrupted output. */
- if (cura == 0)
- ***************
- *** 389,395 ****
-
- nexta++; cura++;
- }
- !
- s_keyboard = 0;
-
- prompt_line = firstl + cura;
- --- 411,418 ----
-
- nexta++; cura++;
- }
- !
- ! fl;
- s_keyboard = 0;
-
- prompt_line = firstl + cura;
- ***************
- *** 419,425 ****
- pct(0L, (long)(n_articles-1), (long)firsta, (long)(firsta+numa)));
-
- if (delayed_msg != NULL) {
- ! msg(delayed_msg);
- delayed_msg = NULL;
- }
-
- --- 442,448 ----
- pct(0L, (long)(n_articles-1), (long)firsta, (long)(firsta+numa)));
-
- if (delayed_msg != NULL) {
- ! msg(delayed_msg, dl_msg_arg);
- delayed_msg = NULL;
- }
-
- ***************
- *** 584,590 ****
- if (save(ah)) {
- if (doing_unshar) {
- if (save_selected)
- ! ah->flag &= ~A_SELECT;
- } else
- if (cura >= 0 && cura <= numa) {
- how = save_selected ? OFF : SAVED;
- --- 607,613 ----
- if (save(ah)) {
- if (doing_unshar) {
- if (save_selected)
- ! ah->flag &= ~(A_SELECT | A_AUTO);
- } else
- if (cura >= 0 && cura <= numa) {
- how = save_selected ? OFF : SAVED;
- ***************
- *** 592,598 ****
- how = TOGGLE;
- } else
- if (save_selected)
- ! ah->flag &= ~A_SELECT;
- }
- }
- }
- --- 615,621 ----
- how = TOGGLE;
- } else
- if (save_selected)
- ! ah->flag &= ~(A_SELECT | A_AUTO);
- }
- }
- }
- ***************
- *** 680,686 ****
- goto redraw;
-
- case K_KILL_HANDLING:
- ! kill_menu((article_header *)NULL);
- goto Prompt;
-
- case K_CONTINUE: /* goto next menu page or show the articles */
- --- 703,728 ----
- goto redraw;
-
- case K_KILL_HANDLING:
- ! switch (kill_menu((article_header *)NULL)) {
- ! case 0: /* select */
- ! do_auto_select((regexp *)NULL, 2);
- ! break;
- ! case 1: /* kill */
- ! if (!do_auto_kill()) break;
- ! elim_list[0] = firsta;
- ! elim_list[1] = firsta + cura;
- ! elim_list[2] = nexta;
- ! if (elim_articles(elim_list, 3)) {
- ! firsta = elim_list[0];
- ! goto redraw;
- ! }
- ! firsta = elim_list[0];
- ! cura = elim_list[1] - firsta;
- ! nexta = elim_list[2];
- ! break;
- ! default:
- ! break;
- ! }
- goto Prompt;
-
- case K_CONTINUE: /* goto next menu page or show the articles */
- ***************
- *** 797,803 ****
-
- case K_UNSELECT_ALL:
- for (cura = -firsta; cura < n_articles - firsta; cura++) {
- ! how = OFF;
- mark();
- }
- fl;
- --- 839,851 ----
-
- case K_UNSELECT_ALL:
- for (cura = -firsta; cura < n_articles - firsta; cura++) {
- ! if (last_k_cmd == K_UNSELECT_ALL) {
- ! if ((articles[firsta + cura]->flag & (A_LEAVE | A_LEAVE_NEXT)) == 0)
- ! continue;
- ! articles[firsta + cura]->flag &= ~(A_LEAVE | A_LEAVE_NEXT);
- ! how = ON_LEAVE;
- ! } else
- ! how = OFF;
- mark();
- }
- fl;
- ***************
- *** 872,880 ****
- goto Prompt;
-
- case K_AUTO_SELECT:
- ! do_auto_select();
- goto same_prompt;
-
- case K_NEXT_PAGE:
- if (nexta < n_articles) goto nextmenu;
- if (firsta == 0) goto same_prompt;
- --- 920,945 ----
- goto Prompt;
-
- case K_AUTO_SELECT:
- ! do_auto_select((regexp *)NULL, 1);
- goto same_prompt;
-
- + case K_GOTO_MATCH:
- + prompt("\1Select regexp\1 ");
- + if ((fname = get_s(NONE, NONE, NONE, NO_COMPLETION)) == NULL)
- + goto Prompt;
- +
- + if (*fname != NUL) {
- + if (regular_expr) free((char *)regular_expr);
- + regular_expr = regcomp(fname);
- + }
- +
- + if (regular_expr == NULL)
- + msg("No previous expression");
- + else
- + do_auto_select(regular_expr, 2);
- +
- + goto Prompt;
- +
- case K_NEXT_PAGE:
- if (nexta < n_articles) goto nextmenu;
- if (firsta == 0) goto same_prompt;
- ***************
- *** 922,931 ****
- preview_next:
- ah = articles[firsta+article_id];
- cura = article_id + 1;
- ! was_selected = (ah->flag & A_SELECT);
- !
- switch (more(ah, MM_PREVIEW, prompt_line)) {
-
- case MC_REDRAW:
- next_cura = cura;
- goto redraw;
- --- 987,1014 ----
- preview_next:
- ah = articles[firsta+article_id];
- cura = article_id + 1;
- !
- ! no_raw();
- switch (more(ah, MM_PREVIEW, prompt_line)) {
-
- + case MC_DO_KILL:
- + if (!do_auto_kill()) break;
- + elim_list[0] = firsta;
- + elim_list[1] = firsta + cura;
- + elim_articles(elim_list, 2);
- + firsta = elim_list[0];
- + next_cura = elim_list[1] - firsta;
- + goto redraw;
- +
- + case MC_DO_SELECT:
- + if (prompt_line >= 0) { /* not redrawn */
- + do_auto_select((regexp *)NULL, 2);
- + break;
- + }
- + numa = -1;
- + do_auto_select((regexp *)NULL, 2);
- + /* FALL THRU */
- +
- case MC_REDRAW:
- next_cura = cura;
- goto redraw;
- ***************
- *** 947,956 ****
- if ((firsta + cura) >= n_articles) goto redraw;
- prompt_line = Lines;
- } else {
- ! if ((ah->flag & A_SELECT) && was_selected == 0) {
- cura--;
- ! ah->flag &= ~A_SELECT;
- ! how = ON;
- mark();
- cura++;
- }
- --- 1030,1038 ----
- if ((firsta + cura) >= n_articles) goto redraw;
- prompt_line = Lines;
- } else {
- ! if (ah->flag & (A_LEAVE | A_LEAVE_NEXT)) {
- cura--;
- ! how = ON_LEAVE;
- mark();
- cura++;
- }
- ***************
- *** 995,1001 ****
-
- static show_articles()
- {
- ! register cur, next, mode;
- int cmd, prev = -1, again;
-
- do {
- --- 1077,1086 ----
-
- static show_articles()
- {
- ! register article_number cur, next;
- ! register article_header *ah;
- ! article_number elim_list[1];
- ! register int mode;
- int cmd, prev = -1, again;
-
- do {
- ***************
- *** 1011,1017 ****
- if (articles[next]->flag & A_SELECT) break;
- }
-
- ! articles[cur]->flag &= ~A_SELECT;
-
- show:
- mode = 0;
- --- 1096,1102 ----
- if (articles[next]->flag & A_SELECT) break;
- }
-
- ! articles[cur]->flag &= ~(A_SELECT | A_AUTO);
-
- show:
- mode = 0;
- ***************
- *** 1020,1029 ****
- if ((cur + 1) >= n_articles) mode |= MM_LAST_ARTICLE;
- if (cur == 0) mode |= MM_FIRST_ARTICLE;
-
- ! cmd = more(articles[cur], mode, 0);
-
- switch(cmd) {
-
- case MC_PREV:
- if (prev == next) break;
-
- --- 1105,1132 ----
- if ((cur + 1) >= n_articles) mode |= MM_LAST_ARTICLE;
- if (cur == 0) mode |= MM_FIRST_ARTICLE;
-
- ! cmd = more(ah = articles[cur], mode, 0);
-
- switch(cmd) {
- +
- + case MC_DO_KILL:
- + if (do_auto_kill()) {
- + elim_list[0] = next;
- + elim_articles(elim_list, 1);
- + cur = elim_list[0];
- + if (cur <= 0) cur = n_articles;
- + continue;
- + }
- + break;
-
- + case MC_DO_SELECT:
- + for (next = cur+1, cur = -1; next < n_articles; next++) {
- + if (auto_select_article(ah = articles[next], 2))
- + ah->flag |= A_SELECT;
- + if (cur < 0 && ah->flag & A_SELECT) cur = next;
- + }
- + continue;
- +
- case MC_PREV:
- if (prev == next) break;
-
- ***************
- *** 1031,1039 ****
- goto show;
-
- case MC_NEXTSUBJ:
- for (next = cur+1; next < n_articles; next++) {
- ! if ((articles[next]->flag & A_SAME) == 0) break;
- ! articles[next]->flag &= ~A_SELECT;
- }
- for (; next < n_articles; next++) {
- if (articles[next]->flag & A_SELECT) break;
- --- 1134,1143 ----
- goto show;
-
- case MC_NEXTSUBJ:
- + ah->flag |= A_READ;
- for (next = cur+1; next < n_articles; next++) {
- ! if (((ah = articles[next])->flag & A_SAME) == 0) break;
- ! ah->flag &= ~(A_SELECT | A_AUTO | A_LEAVE | A_LEAVE_NEXT);
- }
- for (; next < n_articles; next++) {
- if (articles[next]->flag & A_SELECT) break;
- ***************
- *** 1042,1049 ****
-
- case MC_ALLSUBJ:
- for (next = cur+1; next < n_articles; next++) {
- ! if ((articles[next]->flag & A_SAME) == 0) break;
- ! articles[next]->flag |= A_SELECT;
- }
- for (next = cur+1; next < n_articles; next++)
- if (articles[next]->flag & A_SELECT) break;
- --- 1146,1155 ----
-
- case MC_ALLSUBJ:
- for (next = cur+1; next < n_articles; next++) {
- ! ah = articles[next];
- ! if ((ah->flag & A_SAME) == 0) break;
- ! ah->flag &= ~(A_AUTO | A_LEAVE | A_LEAVE_NEXT | A_READ);
- ! ah->flag |= A_SELECT;
- }
- for (next = cur+1; next < n_articles; next++)
- if (articles[next]->flag & A_SELECT) break;
- ***************
- *** 1050,1056 ****
- break;
-
- case MC_MENU:
- ! articles[cur]->flag |= A_SELECT;
- firsta = cur - 5;
- if (firsta < 0) firsta = 0;
- next_cura = cur - firsta;
- --- 1156,1162 ----
- break;
-
- case MC_MENU:
- ! ah->flag |= A_SELECT;
- firsta = cur - 5;
- if (firsta < 0) firsta = 0;
- next_cura = cur - firsta;
- ***************
- *** 1058,1067 ****
- return SH_MENU;
-
- case MC_QUIT:
- return SH_QUIT;
-
- case MC_NEXT:
- ! if (articles[cur]->flag & A_SELECT) again++;
- break;
-
- case MC_BACK_ART:
- --- 1164,1175 ----
- return SH_MENU;
-
- case MC_QUIT:
- + ah->flag |= A_SELECT;
- return SH_QUIT;
-
- case MC_NEXT:
- ! if ((ah->flag & (A_LEAVE | A_LEAVE_NEXT)) == 0)
- ! ah->flag |= A_READ;
- break;
-
- case MC_BACK_ART:
- ***************
- *** 1076,1081 ****
- --- 1184,1190 ----
- break;
-
- case MC_NEXTGROUP:
- + ah->flag |= A_SELECT;
- return SH_NEXT;
-
- case MC_READGROUP:
- ***************
- *** 1085,1093 ****
- prev = cur; cur = next;
- }
-
- ! if (again > 1)
- ! delayed_msg = "Showing this and the following articles again";
- ! else
- if (again == 1)
- delayed_msg = "Showing article again";
-
- --- 1194,1215 ----
- prev = cur; cur = next;
- }
-
- ! for (cur = 0; cur < n_articles; cur++)
- ! if (articles[cur]->flag & A_SELECT) continue;
- !
- ! for (cur = 0; cur < n_articles; cur++) {
- ! ah = articles[cur];
- ! if (ah->flag & A_LEAVE) {
- ! ah->flag &= ~A_LEAVE;
- ! ah->flag |= A_SELECT;
- ! again++;
- ! }
- ! }
- !
- ! if (again > 1) {
- ! delayed_msg = "Showing %ld articles again";
- ! dl_msg_arg = again;
- ! } else
- if (again == 1)
- delayed_msg = "Showing article again";
-
- ***************
- *** 1155,1163 ****
- * if article is in range firsta..firsta+numa (incl) mark article
- */
-
- ! static do_auto_select()
- {
- ! register int i;
- register article_header *ah, **ahp;
- int count = 0, o_cura;
-
- --- 1277,1287 ----
- * if article is in range firsta..firsta+numa (incl) mark article
- */
-
- ! static do_auto_select(re, mode)
- ! regexp *re;
- ! int mode;
- {
- ! register article_number i;
- register article_header *ah, **ahp;
- int count = 0, o_cura;
-
- ***************
- *** 1165,1185 ****
-
- for (i = 0, ahp = articles; i < n_articles; i++, ahp++) {
- ah = *ahp;
- ! if (auto_select_article(ah)) {
- ! count++;
- ! if (ah->flag & A_SELECT) continue;
- ! if (firsta <= i && i <= (firsta+numa)) {
- ! cura = i - firsta;
- ! how = ON;
- ! mark();
- ! } else
- ! ah->flag |= A_SELECT;
- ! }
- }
-
- msg(count == 0 ? "No selections" : "Selected %d article%s",
- count, count > 1 ? "s" : "");
- cura = o_cura;
- }
-
-
- --- 1289,1329 ----
-
- for (i = 0, ahp = articles; i < n_articles; i++, ahp++) {
- ah = *ahp;
- ! if (re != NULL) {
- ! if (!regexec(re, ah->subject)) continue;
- ! } else
- ! if (!auto_select_article(ah, mode)) continue;
- !
- ! count++;
- ! if (ah->flag & A_SELECT) continue;
- ! if (firsta <= i && i <= (firsta+numa)) {
- ! cura = i - firsta;
- ! how = ON;
- ! mark();
- ! } else
- ! ah->flag |= A_SELECT;
- }
-
- msg(count == 0 ? "No selections" : "Selected %d article%s",
- count, count > 1 ? "s" : "");
- cura = o_cura;
- + }
- +
- + static do_auto_kill()
- + {
- + register article_number i;
- + register article_header *ah, **ahp;
- + int any = 0;
- +
- + for (i = 0, ahp = articles; i < n_articles; i++, ahp++) {
- + ah = *ahp;
- + if (auto_select_article(ah, 0)) {
- + ah->flag |= A_KILL;
- + ah->flag &= ~(A_SELECT | A_AUTO);
- + any = 1;
- + }
- + }
- + return any;
- }
-
-
-
- *** /usr/storm/nn6.3.3/menu.h Fri Jun 30 11:30:55 1989
- --- menu.h Thu Jul 6 00:06:59 1989
- ***************
- *** 33,38 ****
- --- 33,40 ----
- #define MC_NO_REDRAW 11 /* screen is not corrupted */
- #define MC_BACK_ART 12 /* back one article (don't deselect cur) */
- #define MC_FORW_ART 13 /* forward one article (deselect cur) */
- + #define MC_DO_KILL 14 /* did kill-select kill */
- + #define MC_DO_SELECT 15 /* did kill-select selection */
-
- /* more modes */
-
-
- *** /usr/storm/nn6.3.3/more.c Fri Jun 30 11:30:56 1989
- --- more.c Sat Jul 8 19:24:54 1989
- ***************
- *** 16,21 ****
- --- 16,22 ----
- import int novice;
-
- import char *delayed_msg;
- + import long dl_msg_arg;
-
- extern char *init_save();
-
- ***************
- *** 47,52 ****
- --- 48,54 ----
- 'S', "Subject", &news.ng_subj, &digest.dg_subj,
- 'W', "Followup-To", &news.ng_follow, 0,
- 'X', "References", &news.ng_ref, 0,
- + 'Y', "Summary", &news.ng_summ, 0,
- 0
- };
-
- ***************
- *** 54,60 ****
- int32 flag;
- {
- static char buf[40];
- ! register char *cp, *sp;
- static int32 prevflag = 0;
-
- flag &= A_ST_FILED | A_ST_REPLY | A_ST_FOLLOW;
- --- 56,62 ----
- int32 flag;
- {
- static char buf[40];
- ! register char *cp;
- static int32 prevflag = 0;
-
- flag &= A_ST_FILED | A_ST_REPLY | A_ST_FOLLOW;
- ***************
- *** 108,114 ****
- int underline_line, fake_underline;
- int match_lines, match_redraw, match_topline, match_botline;
- int goto_line, prev_goto, stop_line, extra_lines;
- ! int in_digest = ah->flag & A_DIGEST;
- article_header digestah;
- char *fname, *hdrline;
- extern STANDOUT;
- --- 110,116 ----
- int underline_line, fake_underline;
- int match_lines, match_redraw, match_topline, match_botline;
- int goto_line, prev_goto, stop_line, extra_lines;
- ! int32 in_digest = ah->flag & A_DIGEST;
- article_header digestah;
- char *fname, *hdrline;
- extern STANDOUT;
- ***************
- *** 622,628 ****
- a_st_flags(ah->flag));
-
- if (delayed_msg != NULL) {
- ! msg(delayed_msg);
- delayed_msg = NULL;
- }
-
- --- 624,630 ----
- a_st_flags(ah->flag));
-
- if (delayed_msg != NULL) {
- ! msg(delayed_msg, dl_msg_arg);
- delayed_msg = NULL;
- }
-
- ***************
- *** 657,663 ****
- }
- #endif
- goto redraw;
- !
- case K_CONTINUE:
- if (eof) break;
- if (screen_offset == 0 && form_feed == 0 && stop_line) {
- --- 659,672 ----
- }
- #endif
- goto redraw;
- !
- ! case K_NEXT_PAGE:
- ! if (eof) {
- ! ding();
- ! goto same_prompt;
- ! }
- ! /* FALL THRU */
- !
- case K_CONTINUE:
- if (eof) break;
- if (screen_offset == 0 && form_feed == 0 && stop_line) {
- ***************
- *** 755,761 ****
- goto redraw;
-
- case K_KILL_HANDLING:
- ! kill_menu(ah);
- goto Prompt;
-
- case K_READ_GROUP_UPDATE:
- --- 764,777 ----
- goto redraw;
-
- case K_KILL_HANDLING:
- ! switch (kill_menu(ah)) {
- ! case 0:
- ! more_return(MC_DO_SELECT);
- ! case 1:
- ! more_return(MC_DO_KILL);
- ! default:
- ! break;
- ! }
- goto Prompt;
-
- case K_READ_GROUP_UPDATE:
- ***************
- *** 812,822 ****
- clrpage(prompt_line);
- no_raw();
-
- ! if (print_lines + lno < Lines)
- goto next_page;
-
- gotoxy(0, Lines-1);
- ! c = print_lines + lno - Lines + 1;
- while (--c >= 0) {
- putchar(NL);
- if (--lno1 < 0) topline++;
- --- 828,838 ----
- clrpage(prompt_line);
- no_raw();
-
- ! if (print_lines + lno < (Lines - 1))
- goto next_page;
-
- gotoxy(0, Lines-1);
- ! c = print_lines + lno - Lines + 2;
- while (--c >= 0) {
- putchar(NL);
- if (--lno1 < 0) topline++;
- ***************
- *** 893,899 ****
- goto Prompt;
-
- if (*fname && *fname != '/') {
- ! if (regular_expr) free(regular_expr);
- regular_expr = regcomp(fname);
- }
-
- --- 909,915 ----
- goto Prompt;
-
- if (*fname && *fname != '/') {
- ! if (regular_expr) free((char *)regular_expr);
- regular_expr = regcomp(fname);
- }
-
- ***************
- *** 941,947 ****
- }
-
- case K_LEAVE_ARTICLE:
- ! ah->flag |= A_SELECT;
- /* fall thru */
-
- case K_NEXT_ARTICLE:
- --- 957,964 ----
- }
-
- case K_LEAVE_ARTICLE:
- ! ah->flag &= ~(A_SELECT | A_AUTO | A_READ);
- ! ah->flag |= A_LEAVE;
- /* fall thru */
-
- case K_NEXT_ARTICLE:
- ***************
- *** 1008,1014 ****
- if ((mode & MM_PREVIEW) && more_cmd != MC_QUIT) {
- gotoxy(0, screen_offset);
- clrpage(screen_offset);
- ! if (more_cmd == MC_PREVIEW_NEXT) {
- if (screen_offset == 0) prompt_line = -1;
- } else {
- if (screen_offset == 0) return MC_REDRAW;
- --- 1025,1032 ----
- if ((mode & MM_PREVIEW) && more_cmd != MC_QUIT) {
- gotoxy(0, screen_offset);
- clrpage(screen_offset);
- ! if (more_cmd == MC_PREVIEW_NEXT ||
- ! more_cmd == MC_DO_SELECT || more_cmd == MC_DO_KILL) {
- if (screen_offset == 0) prompt_line = -1;
- } else {
- if (screen_offset == 0) return MC_REDRAW;
-
- *** /usr/storm/nn6.3.0/news.c Thu Jun 1 11:10:47 1989
- --- news.c Mon Jul 3 17:59:12 1989
- ***************
- *** 66,71 ****
- --- 66,72 ----
- news.ng_dist = NULL;
- news.ng_org = NULL;
- news.ng_appr = NULL;
- + news.ng_summ = NULL;
- news.ng_date = NULL;
- }
-
- ***************
- *** 225,230 ****
- --- 226,233 ----
- check("ubject: ", 8, ng_subj);
- if (news.ng_from == NULL)
- check("ender: ", 7, ng_from);
- + if (!all) break;
- + check("ummary: ", 8, ng_summ);
- break;
-
- case 'T':
-
- *** /usr/storm/nn6.3.0/news.h Thu Jun 1 11:10:47 1989
- --- news.h Mon Jul 3 17:59:12 1989
- ***************
- *** 22,28 ****
- char *ng_dist; /* distibution */
- char *ng_org; /* organization */
- char *ng_appr; /* approved */
- !
- char *ng_date; /* date */
-
- char *ng_xlines; /* lines (from header) */
- --- 22,29 ----
- char *ng_dist; /* distibution */
- char *ng_org; /* organization */
- char *ng_appr; /* approved */
- ! char *ng_summ; /* summary */
- !
- char *ng_date; /* date */
-
- char *ng_xlines; /* lines (from header) */
-
- *** /usr/storm/nn6.3.3/nn.1 Fri Jun 30 11:30:58 1989
- --- nn.1 Sat Jul 8 01:26:21 1989
- ***************
- *** 106,116 ****
- .I never
- mark unread articles as read.
- .TP
- \fInews.group\fP or \fIfile\fP or \fI+folder\fP
- If none of these arguments are given, all subscribed news groups will
- be used. Otherwise, only the specified news groups and/or files will
- be collected and presented. In specifying a news groups, the
- ! following `meta notation' can be used: If the news group ends with a
- \&`.' (or `.all'), all subgroups of the news group will be collected,
- e.g.
- .br
- --- 106,125 ----
- .I never
- mark unread articles as read.
- .TP
- + \-\fBX\fP {\fIno corresponding variable\fP}
- + Read/scan unsubscribed groups also. Most useful when looking for
- + a specific subject in \fBall\fP groups, e.g.
- + .br
- + nn -mxX -sSubject all
- + .br
- + .TP
- \fInews.group\fP or \fIfile\fP or \fI+folder\fP
- If none of these arguments are given, all subscribed news groups will
- be used. Otherwise, only the specified news groups and/or files will
- be collected and presented. In specifying a news groups, the
- ! following `meta notation' can be used:
- ! .br
- ! If the news group ends with a
- \&`.' (or `.all'), all subgroups of the news group will be collected,
- e.g.
- .br
- ***************
- *** 121,127 ****
- .br
- \&.sources.unix
- .br
- ! These notations cannot be mixed (yet)!
- .SH COMMAND INPUT
- In general, \fInn\fP commands consist of one or two key-strokes, and \fInn\fP
- reacts instantly to the commands you give it; you don't have to enter
- --- 130,136 ----
- .br
- \&.sources.unix
- .br
- ! The argument `all' identifies all (subscribed) news groups.
- .SH COMMAND INPUT
- In general, \fInn\fP commands consist of one or two key-strokes, and \fInn\fP
- reacts instantly to the commands you give it; you don't have to enter
- ***************
- *** 366,371 ****
- --- 375,385 ----
- \&\fB+\fP {\fBselect-auto\fP}
- Perform auto-selections in the group (see the section on "auto
- kill/select" below).
- + .TP
- + \&\fB=\fP {\fBfind\fP}
- + Prompts for a regular expression, and selects all articles on the menu
- + (all pages) whose subject matches the regular expression. An empty
- + answer (\fB= return\fP) will reuse the previous expression.
- .LP
- During selection, the cursor will normally be placed on the article
- following the last selected article (initially the first article).
- ***************
- *** 563,569 ****
- in the group have been read as usual, these `left over' articles will
- be presented once more. This is useful if you see an article which
- you may want to respond to unless one the following articles is
- ! already saying what you intended to say.
- .TP
- \&\fBp\fP {\fBprevious\fP}
- Goto previous article.
- --- 577,584 ----
- in the group have been read as usual, these `left over' articles will
- be presented once more. This is useful if you see an article which
- you may want to respond to unless one the following articles is
- ! already saying what you intended to say. The `left over' article is
- ! marked with a `+' following the article id on the menu.
- .TP
- \&\fBp\fP {\fBprevious\fP}
- Goto previous article.
- ***************
- *** 649,656 ****
- Skip the rest of the current article, and \fIpreview the next article\fP.
- .TP
- \&\fBl\fP {\fBleave-article\fP}
- ! Select the article on the menu, then skip the rest of the current
- ! article, and preview the next article.
- .TP
- \&\fB%\fP\fIy\fP {\fBpreview\fP}
- Preview article
- --- 664,673 ----
- Skip the rest of the current article, and \fIpreview the next article\fP.
- .TP
- \&\fBl\fP {\fBleave-article\fP}
- ! Mark the article as `left over' on the menu for handling later on.
- ! Then skip the rest of the current
- ! article, and preview the next article. The `left over' article is
- ! marked with a `+' following the article id on the menu.
- .TP
- \&\fB%\fP\fIy\fP {\fBpreview\fP}
- Preview article
- ***************
- *** 1732,1737 ****
- --- 1749,1760 ----
- \fBdebug\fP \fImask\fP (integer, default 0)
- Look in the source if you are going to use this.
- .TP
- + \fBdefault-distribution\fP \fIdistr\fP (string, default not set)
- + The distribution to use as the default suggestion when posting
- + articles using the \fBpost\fP command. If it is not set, the
- + first component of the group name is used as the suggested
- + distribution, e.g. `comp' when posting to comp.whatever.
- + .TP
- \fBdefault-save-file\fP \fIfile\fP (string, default +$F)
- The default save file used in quick save mode. It can also be
- specified using the abbreviation "+" as the file name in normal save
- ***************
- *** 1832,1837 ****
- --- 1855,1869 ----
- When set, \fInn\fP will save articles in a format that is compatible
- with normal mail folders.
- .TP
- + \fBmail-header\fP \fIheaders\fP (string, default not set)
- + The \fIheaders\fP string specifies one or more extra header lines
- + (separated by semi-colons `;') which are added to the header of mail
- + sent from \fInn\fP using the \fBreply\fP and \fBmail\fP commands. For
- + example:
- + .br
- + set mail-header Reply-To: storm@texas.dk
- + .br
- + .TP
- \fBmail-record\fP \fIfile\fP (string, default not set)
- \fIfile\fP must be a full path name of a file. If defined, all replies and
- mail will be saved in this file in standard
- ***************
- *** 1850,1855 ****
- --- 1882,1893 ----
- characters in the received messages using a "cat -v" like format.
- Otherwise, only the printable characters are shown (default).
- .TP
- + \fBnews-header\fP \fIheaders\fP (string, default not set)
- + The \fIheaders\fP string specifies one or more extra header lines
- + (separated by semi-colons `;') which are added to the header of
- + articles posted from \fInn\fP using the \fBfollow\fP and \fBpost\fP
- + commands.
- + .TP
- \fBnews-record\fP \fIfile\fP (string, default not set)
- Save file for follow-ups and postings. Same rules and format as the
- \fBmail-record\fP variable.
- ***************
- *** 2029,2034 ****
- --- 2067,2074 ----
- \fBW\fP Followup-To:
- .br
- \fBX\fP References:
- + .br
- + \fBY\fP Summary:
- .in -8n
- .DT
- .LP
- ***************
- *** 2153,2158 ****
- --- 2193,2205 ----
- read articles. This will
- .I never
- mark unread articles as read.
- + .TP
- + \-\fBX\fP {\fIno corresponding variable\fP}
- + Read/scan unsubscribed groups also. Most useful when looking for
- + a specific subject in all groups, e.g.
- + .br
- + nn -mxX -sSubject all
- + .br
- .SH KEY MAPPINGS
- The descriptions of the keys and commands provided in this manual
- reflects the default key mappings in \fInn\fP. However, you can
- ***************
- *** 2304,2310 ****
- .br
- \fBcontinue\fP \fBspace\fP \fBspace\fP
- .br
- ! \fBfind\fP \fBnix\fP /
- .br
- \fBfind-next\fP \fBnix\fP .
- .br
- --- 2351,2357 ----
- .br
- \fBcontinue\fP \fBspace\fP \fBspace\fP
- .br
- ! \fBfind\fP = /
- .br
- \fBfind-next\fP \fBnix\fP .
- .br
-
- *** /usr/storm/nn6.3.0/nn.c Thu Jun 1 11:10:57 1989
- --- nn.c Sat Jul 8 01:26:22 1989
- ***************
- *** 30,35 ****
- --- 30,36 ----
- show_article_date, first_page_lines, /* more.c */
- dont_split_digests, dont_sort_articles, /* group.c */
- dont_sort_folders, /* folder.c */
- + also_unsub_groups, /* sequence.c*/
- show_current_time, conf_dont_sleep; /* term.c */
-
- Option_Description(nn_options) {
- ***************
- *** 52,57 ****
- --- 53,59 ----
- 'w', Int_Option_Optional(preview_window, 5),
- 'W', Bool_Option(conf_dont_sleep),
- 'x', Int_Option_Optional(also_read_articles, -1),
- + 'X', Bool_Option(also_unsub_groups),
- 'Z', Int_Option(Debug),
- '\0',
- };
- ***************
- *** 84,98 ****
- extern long unread_articles;
- extern char *program_name();
- int emacs_slave_mode = 0, check_news = 0, enter_admin_mode = 0;
- !
- pname = program_name(argv);
- ! if (strcmp(pname, "nnadmin") == 0)
- enter_admin_mode = 1;
- ! else
- if (strcmp(pname, "nnemacs") == 0)
- emacs_slave_mode = 1;
- else
- if (strcmp(pname, "nncheck") == 0) {
- keep_rc_backup = 0;
- check_news = 1;
- }
- --- 86,103 ----
- extern long unread_articles;
- extern char *program_name();
- int emacs_slave_mode = 0, check_news = 0, enter_admin_mode = 0;
- ! int who_am_i = 0;
- !
- pname = program_name(argv);
- ! if (strcmp(pname, "nnadmin") == 0) {
- ! who_am_i = 2;
- enter_admin_mode = 1;
- ! } else
- if (strcmp(pname, "nnemacs") == 0)
- emacs_slave_mode = 1;
- else
- if (strcmp(pname, "nncheck") == 0) {
- + who_am_i = 3;
- keep_rc_backup = 0;
- check_news = 1;
- }
- ***************
- *** 103,109 ****
- nn_exit(1);
- }
-
- ! init_global(0);
- init_key_map();
- init_execute();
- init_macro();
- --- 108,118 ----
- nn_exit(1);
- }
-
- ! if (init_global(who_am_i) < 0) {
- ! fprintf(stderr, "%s: nn has not been invoked to initialize user files\n", pname);
- ! nn_exit(1);
- ! }
- !
- init_key_map();
- init_execute();
- init_macro();
- ***************
- *** 209,217 ****
- }
-
- if (prompt_for_group) {
- raw();
- current_group = NULL;
- ! prompt_line = Lines - 1;
- goto_group(K_GOTO_GROUP, (article_header *)NULL);
- no_raw();
- clrdisp();
- --- 218,227 ----
- }
-
- if (prompt_for_group) {
- + printf("\r\n\n");
- raw();
- current_group = NULL;
- ! prompt_line = Lines - 3;
- goto_group(K_GOTO_GROUP, (article_header *)NULL);
- no_raw();
- clrdisp();
- ***************
- *** 276,281 ****
- --- 286,293 ----
-
- if (loop) exit(n);
- loop++;
- +
- + unset_raw();
-
- #ifdef NNTP
- nntp_cleanup();
- ***************
- *** 352,358 ****
- cur->last_l_article = 0;
- }
- } else
- ! menu_cmd = group_menu(cur, -1,
- match_subject, do_kill_handling, menu);
-
- if (menu_cmd != ME_NO_ARTICLES)
- --- 364,370 ----
- cur->last_l_article = 0;
- }
- } else
- ! menu_cmd = group_menu(cur, (article_number)(-1),
- match_subject, do_kill_handling, menu);
-
- if (menu_cmd != ME_NO_ARTICLES)
-
- *** /usr/storm/nn6.3.2/rc.c Wed Jun 28 20:08:07 1989
- --- rc.c Wed Jul 5 14:53:09 1989
- ***************
- *** 186,191 ****
- --- 186,197 ----
- gh->group_flag |= G_SUBSCRIPTION | G_NEW;
-
- gh->last_article = LASTART(line);
- +
- + if (gh->group_flag & G_BLOCKED) {
- + /* We cannot trust this group, so we leave it alone */
- + /* group_menu after update_group will do what is necessary */
- + continue;
- + }
-
- if (gh->last_article > gh->last_l_article)
- gh->group_flag |= G_RENUM; /* mark for use below */
- ***************
- *** 420,426 ****
- int mode; /* +1 => add, -1 => subtract */
- {
- long art;
- ! int was_unread;
-
- art = gh->last_l_article - gh->last_article;
- was_unread = (gh->group_flag & G_UNREAD_COUNT);
- --- 426,432 ----
- int mode; /* +1 => add, -1 => subtract */
- {
- long art;
- ! int32 was_unread;
-
- art = gh->last_l_article - gh->last_article;
- was_unread = (gh->group_flag & G_UNREAD_COUNT);
-
- *** /usr/storm/nn6.3.3/save.c Fri Jun 30 11:31:09 1989
- --- save.c Wed Jul 5 17:00:28 1989
- ***************
- *** 259,265 ****
-
- #ifdef PAGED_OUTPUT
- if (save_mode & DO_UNSHAR) {
- ! int was_raw = no_raw();
- pager_stream = popen(pager, "w");
- if (was_raw) raw();
-
- --- 259,265 ----
-
- #ifdef PAGED_OUTPUT
- if (save_mode & DO_UNSHAR) {
- ! int was_raw = unset_raw();
- pager_stream = popen(pager, "w");
- if (was_raw) raw();
-
- ***************
- *** 329,335 ****
- fclose(art);
- return 0;
- }
- ! was_raw = no_raw();
- if (save_name)
- #ifdef PAGED_OUTPUT
- sprintf(copybuf, "cd %s && %s %s", save_name, unshar_cmd, pager_redir);
- --- 329,335 ----
- fclose(art);
- return 0;
- }
- ! was_raw = unset_raw();
- if (save_name)
- #ifdef PAGED_OUTPUT
- sprintf(copybuf, "cd %s && %s %s", save_name, unshar_cmd, pager_redir);
- ***************
- *** 383,389 ****
- }
-
- if (mode == FULL_HEADER) {
- ! int cnt = ah->fpos - ah->hpos;
- while (--cnt >= 0) {
- if ((c = getc(art)) == EOF) break;
- putc(c, save_file);
- --- 383,389 ----
- }
-
- if (mode == FULL_HEADER) {
- ! off_t cnt = ah->fpos - ah->hpos;
- while (--cnt >= 0) {
- if ((c = getc(art)) == EOF) break;
- putc(c, save_file);
-
- *** /usr/storm/nn6.3.2/selection.c Wed Jun 28 20:08:10 1989
- --- selection.c Sat Jul 8 16:21:37 1989
- ***************
- *** 5,11 ****
- #include "config.h"
- #include "articles.h"
-
- ! #define SLMAGIC 0x536c6374
- #define GNAME_LGT 32
-
- static struct sel_header {
- --- 5,11 ----
- #include "config.h"
- #include "articles.h"
-
- ! #define SLMAGIC 0x536c6375
- #define GNAME_LGT 32
-
- static struct sel_header {
- ***************
- *** 35,47 ****
- };
-
-
- ! save_selection(gh, first, last)
- group_header *gh;
- article_number first, last;
- {
- register article_header *ah, **ahp;
- ! register int art;
- ! register int save_count, seen_count, flags;
- struct sel_art elem;
- FILE *f;
- char buffer[16];
- --- 35,49 ----
- };
-
-
- ! save_selection(gh, first, last, type)
- group_header *gh;
- article_number first, last;
- + int type;
- {
- register article_header *ah, **ahp;
- ! register article_number art;
- ! register int save_count, seen_count;
- ! register int32 flags, save_flags;
- struct sel_art elem;
- FILE *f;
- char buffer[16];
- ***************
- *** 48,57 ****
-
- if (gh->group_flag & (G_FOLDER | G_READ)) return;
-
- for (save_count = seen_count = 0, art = n_articles; --art >= 0; ) {
- flags = articles[art]->flag;
- if (flags & A_SEEN) seen_count++;
- ! if (flags & A_SELECT) save_count++;
- }
-
- if (save_count == 0 &&
- --- 50,66 ----
-
- if (gh->group_flag & (G_FOLDER | G_READ)) return;
-
- + save_flags = A_LEAVE | A_LEAVE_NEXT;
- + if (type == 0) save_flags |= A_READ;
- +
- for (save_count = seen_count = 0, art = n_articles; --art >= 0; ) {
- flags = articles[art]->flag;
- if (flags & A_SEEN) seen_count++;
- ! if (flags & A_KILL) continue;
- ! /* we count only the non-auto selected articles, */
- ! /* but we still save all selections later if save_count > 0 */
- ! if ((flags & save_flags) || (flags & (A_SELECT | A_AUTO)) == A_SELECT)
- ! save_count++;
- }
-
- if (save_count == 0 &&
- ***************
- *** 66,84 ****
- header.sl_first = htonl(first);
- header.sl_last = htonl(last);
-
- ! fwrite(&header, sizeof(header), 1, f);
-
- unsort_articles(1);
-
- for (ahp = articles, art = 0; art < n_articles; ahp++, art++) {
- ah = *ahp;
- ! if (elem.sl_flag = htonl(ah->flag & (A_SELECT | A_SEEN))) {
- !
- ! elem.sl_number = htonl(ah->a_number);
- ! elem.sl_fpos = htonl(ah->fpos);
- !
- ! fwrite(&elem, sizeof(elem), 1, f);
- }
- }
-
- fclose(f);
- --- 75,104 ----
- header.sl_first = htonl(first);
- header.sl_last = htonl(last);
-
- ! fwrite((char *)&header, sizeof(header), 1, f);
-
- unsort_articles(1);
-
- for (ahp = articles, art = 0; art < n_articles; ahp++, art++) {
- ah = *ahp;
- ! switch (type) {
- ! case 0: /* save current selection */
- ! break;
- ! case 1: /* mark seen as read */
- ! if (ah->flag & (A_READ | A_SEEN)) continue;
- ! break;
- ! case 2: /* leave seen articles unread */
- ! if (ah->flag & A_READ) continue;
- ! ah->flag &= ~A_SEEN;
- ! break;
- }
- + if (ah->flag & A_LEAVE_NEXT) ah->flag |= A_LEAVE;
- +
- + elem.sl_flag = htonl(ah->flag & (A_SELECT | A_SEEN | A_LEAVE | A_READ));
- + elem.sl_number = htonl(ah->a_number);
- + elem.sl_fpos = htonl(ah->fpos);
- +
- + fwrite((char *)&elem, sizeof(elem), 1, f);
- }
-
- fclose(f);
- ***************
- *** 102,108 ****
- f = open_file(relative(nn_directory, buffer), OPEN_READ|OPEN_UNLINK);
- if (f == NULL) return 0;
-
- ! if (fread(&header, sizeof(header), 1, f) != 1
- || ntohl(header.sl_magic) != SLMAGIC
- || strncmp(header.sl_group, gh->group_name, GNAME_LGT)) {
- fclose(f);
- --- 122,128 ----
- f = open_file(relative(nn_directory, buffer), OPEN_READ|OPEN_UNLINK);
- if (f == NULL) return 0;
-
- ! if (fread((char *)&header, sizeof(header), 1, f) != 1
- || ntohl(header.sl_magic) != SLMAGIC
- || strncmp(header.sl_group, gh->group_name, GNAME_LGT)) {
- fclose(f);
- ***************
- *** 138,145 ****
- register long art;
- struct sel_art elem;
- register article_header *ah, **ahp;
- !
- ! if (!ok) goto out;
-
- elem.sl_number = -1;
-
- --- 158,169 ----
- register long art;
- struct sel_art elem;
- register article_header *ah, **ahp;
- ! int do_elim = 0;
- !
- ! if (!ok) {
- ! fclose(sel_file);
- ! return;
- ! }
-
- elem.sl_number = -1;
-
- ***************
- *** 149,155 ****
- if (ah->a_number > header.sl_last) break;
-
- while (ah->a_number > elem.sl_number) {
- ! if (fread(&elem, sizeof(elem), 1, sel_file) != 1) goto out;
- #ifndef NETWORK_BYTE_ORDER
- elem.sl_number = ntohl(elem.sl_number);
- #endif
- --- 173,179 ----
- if (ah->a_number > header.sl_last) break;
-
- while (ah->a_number > elem.sl_number) {
- ! if (fread((char *)&elem, sizeof(elem), 1, sel_file) != 1) goto out;
- #ifndef NETWORK_BYTE_ORDER
- elem.sl_number = ntohl(elem.sl_number);
- #endif
- ***************
- *** 159,165 ****
- elem.sl_fpos = ntohl(elem.sl_fpos);
- #endif
- while (ah->a_number == elem.sl_number && ah->fpos > elem.sl_fpos) {
- ! if (fread(&elem, sizeof(elem), 1, sel_file) != 1) goto out;
- #ifndef NETWORK_BYTE_ORDER
- elem.sl_number = ntohl(elem.sl_number);
- elem.sl_fpos = ntohl(elem.sl_fpos);
- --- 183,189 ----
- elem.sl_fpos = ntohl(elem.sl_fpos);
- #endif
- while (ah->a_number == elem.sl_number && ah->fpos > elem.sl_fpos) {
- ! if (fread((char *)&elem, sizeof(elem), 1, sel_file) != 1) goto out;
- #ifndef NETWORK_BYTE_ORDER
- elem.sl_number = ntohl(elem.sl_number);
- elem.sl_fpos = ntohl(elem.sl_fpos);
- ***************
- *** 166,179 ****
- #endif
- }
-
- ! if (ah->a_number != elem.sl_number || ah->fpos != elem.sl_fpos)
- continue;
- !
- ah->flag |= ntohl(elem.sl_flag);
- }
-
- out:
- !
- fclose(sel_file);
- }
-
- --- 190,213 ----
- #endif
- }
-
- ! if (ah->a_number != elem.sl_number || ah->fpos != elem.sl_fpos) {
- ! ah->flag |= A_KILL;
- ! do_elim = 1;
- continue;
- ! }
- ah->flag |= ntohl(elem.sl_flag);
- }
-
- out:
- ! for ( ; art < n_articles ; art++) {
- ! ah = *ahp++;
- ! if (ah->a_number > header.sl_last) break;
- ! ah->flag |= A_KILL;
- ! do_elim = 1;
- ! }
- !
- ! if (do_elim) elim_articles((article_number *)NULL, 0);
- !
- fclose(sel_file);
- }
-
-
- *** /usr/storm/nn6.3.2/sequence.c Wed Jun 28 20:08:11 1989
- --- sequence.c Sat Jul 8 01:26:22 1989
- ***************
- *** 7,12 ****
- --- 7,13 ----
-
- export group_header *group_sequence;
- export char *read_mail = NULL;
- + export int also_unsub_groups = 0;
-
- static int seq_break_enabled = 1; /* !! enabled */
-
- ***************
- *** 77,83 ****
- found = 0;
- start_group_search(group);
- while (gh = get_group_search()) {
- ! if ((gh->group_flag & G_SUBSCRIPTION) == 0) continue;
- found++;
- enter_normal(gh);
- }
- --- 78,85 ----
- found = 0;
- start_group_search(group);
- while (gh = get_group_search()) {
- ! if ((gh->group_flag & G_SUBSCRIPTION) == 0 && !also_unsub_groups)
- ! continue;
- found++;
- enter_normal(gh);
- }
- ***************
- *** 117,123 ****
- Loop_Groups_Sorted(gh) {
- if (gh->group_flag & G_DONE) continue;
-
- ! if ((gh->group_flag & G_SUBSCRIPTION) == 0) continue;
-
- enter_normal(gh);
- }
- --- 119,126 ----
- Loop_Groups_Sorted(gh) {
- if (gh->group_flag & G_DONE) continue;
-
- ! if ((gh->group_flag & G_SUBSCRIPTION) == 0 && !also_unsub_groups)
- ! continue;
-
- enter_normal(gh);
- }
- ***************
- *** 301,307 ****
- gh->save_file = dflt_save;
-
- if (group_name_args == 0 &&
- ! (gh->group_flag & G_SUBSCRIPTION) == 0) continue;
-
- #ifdef SEQ_TEST
- if (Debug & SEQ_TEST && mode != SHOW_NORMAL)
- --- 304,311 ----
- gh->save_file = dflt_save;
-
- if (group_name_args == 0 &&
- ! (gh->group_flag & G_SUBSCRIPTION) == 0 && !also_unsub_groups)
- ! continue;
-
- #ifdef SEQ_TEST
- if (Debug & SEQ_TEST && mode != SHOW_NORMAL)
- ***************
- *** 364,370 ****
- group_header *gh;
-
- gh = (group_header *)calloc(1, sizeof(group_header));
- ! mem_check(gh, 1, "group header");
-
- gh->group_name = name;
- gh->group_flag = flag | G_READ;
- --- 368,374 ----
- group_header *gh;
-
- gh = (group_header *)calloc(1, sizeof(group_header));
- ! mem_check((char *)gh, 1, "group header");
-
- gh->group_name = name;
- gh->group_flag = flag | G_READ;
- ***************
- *** 384,389 ****
- --- 388,394 ----
- #define GS_SUFFIX 2 /* .group */
- #define GS_INFIX 3 /* .group. */
- #define GS_NEW_GROUP 4 /* new group */
- + #define GS_ALL 5 /* all / . */
-
- static start_group_search(group)
- char *group;
- ***************
- *** 393,398 ****
- --- 398,407 ----
- if (strcmp(group, "NEW") == 0) {
- gs_mode = GS_NEW_GROUP;
- gs_length = 0;
- + } else
- + if (strcmp(group, "all") == 0 || strcmp(group, ".") == 0) {
- + gs_mode = GS_ALL;
- + gs_length = 0;
- } else {
- gs_mode = GS_PREFIX;
-
- ***************
- *** 446,451 ****
- --- 455,463 ----
-
- case GS_INFIX:
- user_error(".name. notation not supported (yet)");
- + break;
- +
- + case GS_ALL:
- break;
- }
-
-
- *** /usr/storm/nn6.3.3/term.c Fri Jun 30 11:31:10 1989
- --- term.c Wed Jul 5 16:52:18 1989
- ***************
- *** 20,25 ****
- --- 20,26 ----
- export int prompt_length;
- export int slow_mode = 0;
- export int any_message = 0;
- + export int flow_control = 1;
-
- export char help_key = '?';
- export char comp1_key = SP;
- ***************
- *** 36,41 ****
- --- 37,44 ----
-
- #define HAS_CAP(str) (str && *str)
-
- + extern char *tgoto(); /* some systems don't have this in term.h */
- +
- #else
-
- #define USE_TERMCAP
- ***************
- *** 233,239 ****
- #endif
-
- #ifdef USE_TERMINFO
- ! setupterm(0,1,0);
- Columns = columns;
- Lines = lines;
- cookie_size = magic_cookie_glitch;
- --- 236,242 ----
- #endif
-
- #ifdef USE_TERMINFO
- ! setupterm((char *)NULL, 1, (int *)NULL);
- Columns = columns;
- Lines = lines;
- cookie_size = magic_cookie_glitch;
- ***************
- *** 521,529 ****
- --- 524,538 ----
- }
-
- static int is_raw = 0;
- + static int must_set_raw = 1;
-
- raw()
- {
- + if (!flow_control) {
- + if (!must_set_raw) return;
- + must_set_raw = 0;
- + }
- +
- if (is_raw) return;
-
- #ifdef HAVE_TERMIO
- ***************
- *** 536,541 ****
- --- 545,552 ----
-
- no_raw()
- {
- + if (!flow_control) return 0;
- +
- if (!is_raw) return 0;
-
- #ifdef HAVE_TERMIO
- ***************
- *** 546,551 ****
- --- 557,575 ----
- is_raw = 0;
-
- return 1;
- + }
- +
- + unset_raw()
- + {
- + int oflow = flow_control;
- + int was_raw;
- +
- + flow_control = 1;
- + was_raw = no_raw();
- + flow_control = oflow;
- + if (!flow_control)
- + must_set_raw = 1;
- + return was_raw;
- }
-
- flush_input()
-
- *** /usr/storm/nn6.3.0/term.h Thu Jun 1 11:11:03 1989
- --- term.h Wed Jul 5 14:58:50 1989
- ***************
- *** 25,30 ****
- --- 25,45 ----
-
- extern get_c();
-
- + /* special keys returned by get_c() */
- +
- + #define K_interrupt CTRL('G')
- +
- + #define K_up_arrow 0x0081
- + #define K_down_arrow 0x0082
- + #define K_left_arrow 0x0083
- + #define K_right_arrow 0x0084
- +
- + #define K_function(n) (0x0085 + n)
- +
- +
- + #define GETC_COMMAND 0x4000 /* bit set by get_c to return a command */
- +
- +
- /*
- * prompt_line = ...
- * prompt( [P_COMMAND], ] [ format [, arg1 ... , arg4] ] );
-
- *** /usr/storm/nn6.3.3/variable.c Fri Jun 30 11:31:12 1989
- --- variable.c Mon Jul 10 11:33:52 1989
- ***************
- *** 7,13 ****
- --- 7,16 ----
- import in_init;
-
- import char /* string variables */
- + *default_distribution,
- *default_save_file,
- + *extra_mail_headers,
- + *extra_news_headers,
- *header_lines,
- *folder_directory,
- included_mark[],
- ***************
- *** 14,22 ****
- *mail_box,
- *mail_record,
- *news_record,
- - #ifdef NNTP
- - nntp_server[],
- - #endif
- *pager,
- *patch_cmd,
- printer[],
- --- 17,22 ----
- ***************
- *** 31,42 ****
- --- 31,45 ----
- dont_sort_articles,
- dont_sort_folders,
- dont_split_digests,
- + flow_control,
- fmt_rptsubj,
- + include_art_id,
- keep_rc_backup,
- long_menu,
- macro_debug,
- mark_overlap,
- monitor_mode,
- + nn_re_style,
- novice,
- quick_save,
- save_report,
- ***************
- *** 85,98 ****
- --- 88,104 ----
- "cross-post", V_BOOLEAN, 0, (char **)&also_cross_postings,
- "date", V_BOOLEAN, 0, (char **)&show_article_date,
- "debug", V_INTEGER, 0, (char **)&Debug,
- + "default-distribution",V_STRING, 0, (char **)&default_distribution,
- "default-save-file",V_STRING, 0, (char **)&default_save_file,
- "delay-redraw", V_BOOLEAN, 0, (char **)&delay_redraw,
- "erase-key", V_KEY, 0, (char **)&erase_key,
- "expert", V_BOOLEAN, 4, (char **)&novice,
- + "flow-control", V_BOOLEAN, 0, (char **)&flow_control,
- "folder", V_STRING, 2, (char **)&folder_directory,
- "fsort", V_BOOLEAN, 2, (char **)&dont_sort_folders,
- "header-lines", V_STRING, 0, (char **)&header_lines,
- "help-key", V_KEY, 0, (char **)&help_key,
- + "include-art-id", V_BOOLEAN, 0, (char **)&include_art_id,
- "included-mark", V_STRING, 1, (char **)included_mark,
- "kill", V_BOOLEAN, 0, (char **)&do_kill_handling,
- "kill-key", V_KEY, 0, (char **)&kill_key,
- ***************
- *** 103,116 ****
- "macro-debug", V_BOOLEAN, 0, (char **)¯o_debug,
- "mail", V_STRING, 0, (char **)&mail_box,
- "mail-format", V_BOOLEAN, 0, (char **)&use_mail_folders,
- "mail-record", V_STRING, 2, (char **)&mail_record,
- "mark-overlap", V_BOOLEAN, 0, (char **)&mark_overlap,
- "monitor", V_BOOLEAN, 0, (char **)&monitor_mode,
- "news-record", V_STRING, 2, (char **)&news_record,
- "newsrc", V_BOOLEAN, 0, (char **)&use_newsrc,
- ! #ifdef NNTP
- ! "nntp-server", V_STRING, 1, (char **)nntp_server,
- ! #endif
- "old", V_SPECIAL, 2, (char **)NULL,
- "overlap", V_INTEGER, 0, (char **)&overlap,
- "pager", V_STRING, 0, (char **)&pager,
- --- 109,122 ----
- "macro-debug", V_BOOLEAN, 0, (char **)¯o_debug,
- "mail", V_STRING, 0, (char **)&mail_box,
- "mail-format", V_BOOLEAN, 0, (char **)&use_mail_folders,
- + "mail-header", V_STRING, 0, (char **)&extra_mail_headers,
- "mail-record", V_STRING, 2, (char **)&mail_record,
- "mark-overlap", V_BOOLEAN, 0, (char **)&mark_overlap,
- "monitor", V_BOOLEAN, 0, (char **)&monitor_mode,
- + "news-header", V_STRING, 0, (char **)&extra_news_headers,
- "news-record", V_STRING, 2, (char **)&news_record,
- "newsrc", V_BOOLEAN, 0, (char **)&use_newsrc,
- ! "nn-re-style", V_BOOLEAN, 0, (char **)&nn_re_style,
- "old", V_SPECIAL, 2, (char **)NULL,
- "overlap", V_INTEGER, 0, (char **)&overlap,
- "pager", V_STRING, 0, (char **)&pager,
- ***************
- *** 171,177 ****
- int on;
- char *val_string;
- {
- ! long value;
- register struct variable_defs *var;
-
- if (strncmp(variable, "no", 2) == 0) {
- --- 177,183 ----
- int on;
- char *val_string;
- {
- ! int value;
- register struct variable_defs *var;
-
- if (strncmp(variable, "no", 2) == 0) {
- ***************
- *** 185,191 ****
- if (!on || val_string == NULL)
- value = 0;
- else
- ! value = atol(val_string);
-
- switch (var->var_type) {
-
- --- 191,197 ----
- if (!on || val_string == NULL)
- value = 0;
- else
- ! value = atoi(val_string);
-
- switch (var->var_type) {
-
-
- *** /usr/storm/nn6.3.3/xmakefile Fri Jun 30 11:31:13 1989
- --- xmakefile Mon Jul 10 11:40:15 1989
- ***************
- *** 182,258 ****
- cvt-help: cvt-help.c
- cc -o cvt-help cvt-help.c
-
- ! active.o: active.c config.h global.h data.h
- !
- ! admin.o: admin.c config.h global.h data.h term.h db.h
- !
- ! answer.o: answer.c config.h global.h data.h news.h term.h keymap.h
- !
- ! articles.o: articles.c config.h global.h data.h articles.h db.h match.h
- !
- ! collect.o: collect.c config.h global.h data.h db.h news.h
- !
- ! date_regexp.o: config.h global.h data.h
- !
- ! db.o: db.c config.h global.h data.h db.h
- !
- ! decode.o: decode.c config.h
- !
- ! digest.o: digest.c config.h global.h data.h news.h match.h
- !
- ! execute.o: execute.c config.h global.h data.h term.h
- !
- ! expire.o: expire.c config.h global.h data.h
- !
- ! folder.o: folder.c config.h global.h data.h articles.h news.h term.h menu.h
- !
- ! global.o: global.c config.h global.h data.h
- !
- ! group.o: group.c config.h global.h data.h articles.h db.c term.h menu.h keymap.h
- !
- ! init.o: init.c config.h global.h data.h articles.h keymap.h term.h menu.h
- !
- ! keymap.o: keymap.c config.h global.h data.h keymap.h term.h
- !
- ! kill.o: kill.c config.h global.h data.h term.h
- !
- log_entry.o: log_entry.c
- !
- ! master.o: master.c config.h global.h data.h
- !
- ! menu.o: menu.c config.h global.h data.h articles.h term.h menu.h keymap.h
- !
- ! more.o: more.c config.h global.h data.h news.h term.h menu.h keymap.h
- !
- ! news.o: news.c config.h global.h data.h news.h
- !
- ! nn.o: nn.c config.h global.h data.h menu.h term.h keymap.h
- !
- ! nnmail.o: nnmail.c config.h global.h data.h options.h
- !
- ! nntp.o: nntp.c config.h global.h data.h nntp.h
- !
- ! options.o: options.c config.h global.h data.h options.h
- !
- ! pack_date.o: pack_date.c config.h global.h data.h
- !
- ! pack_name.o: pack_name.c config.h global.h data.h
- !
- ! pack_subject.o: pack_subject.c config.h global.h data.h
- !
- ! rc.o: rc.c config.h global.h data.h term.h
- !
- ! reroute.o: reroute.c config.h global.h data.h
- !
- ! save.o: save.c config.h global.h data.h term.h news.h keymap.h
- !
- ! selection.o: selection.c config.h global.h data.h articles.h
- !
- ! sequence.o: sequence.c config.h global.h data.h
- !
- ! variable.o: variable.c config.h global.h data.h
- !
- ! term.o: term.c config.h global.h data.h term.h keymap.h
-
- * link debugging version
-
- --- 182,240 ----
- cvt-help: cvt-help.c
- cc -o cvt-help cvt-help.c
-
- ! active.o: active.c config.h global.h vararg.h data.h
- ! admin.o: admin.c config.h global.h vararg.h data.h db.h term.h
- ! answer.o: answer.c config.h global.h vararg.h data.h news.h term.h \
- ! keymap.h
- ! articles.o: articles.c config.h global.h vararg.h data.h db.h articles.h \
- ! match.h
- ! collect.o: collect.c config.h global.h vararg.h data.h db.h news.h
- ! cvt-help.o: cvt-help.c
- ! date_regexp.o: date_regexp.c config.h global.h vararg.h data.h
- ! db.o: db.c config.h global.h vararg.h data.h db.h
- ! decode.o: decode.c config.h global.h vararg.h data.h
- ! digest.o: digest.c config.h global.h vararg.h data.h news.h match.h \
- ! debug.h
- ! execute.o: execute.c config.h global.h vararg.h data.h term.h
- ! expire.o: expire.c config.h global.h vararg.h data.h db.h
- ! folder.o: folder.c config.h global.h vararg.h data.h articles.h news.h \
- ! term.h menu.h
- ! global.o: global.c config.h global.h vararg.h data.h
- ! group.o: group.c config.h global.h vararg.h data.h articles.h db.h \
- ! term.h menu.h keymap.h regexp.h
- ! init.o: init.c config.h global.h vararg.h data.h articles.h term.h \
- ! keymap.h menu.h
- ! keymap.o: keymap.c config.h global.h vararg.h data.h keymap.h term.h
- ! kill.o: kill.c config.h global.h vararg.h data.h term.h regexp.h
- log_entry.o: log_entry.c
- ! macro.o: macro.c config.h global.h vararg.h data.h keymap.h term.h
- ! master.o: master.c config.h global.h vararg.h data.h db.h options.h
- ! match.o: match.c
- ! menu.o: menu.c config.h global.h vararg.h data.h articles.h term.h \
- ! keymap.h menu.h regexp.h
- ! more.o: more.c config.h global.h vararg.h data.h news.h term.h \
- ! menu.h keymap.h regexp.h
- ! news.o: news.c config.h global.h vararg.h data.h news.h
- ! nn.o: nn.c config.h global.h vararg.h data.h menu.h term.h \
- ! keymap.h options.h
- ! nnmail.o: nnmail.c config.h global.h vararg.h data.h options.h
- ! nntp.o: nntp.c config.h global.h vararg.h data.h nntp.h
- ! options.o: options.c config.h global.h vararg.h data.h options.h
- ! pack_date.o: pack_date.c config.h global.h vararg.h data.h
- ! pack_name.o: pack_name.c config.h global.h vararg.h data.h
- ! pack_subject.o: pack_subject.c config.h global.h vararg.h data.h
- ! rc.o: rc.c config.h global.h vararg.h data.h term.h debug.h
- ! regexp.o: regexp.c config.h global.h vararg.h data.h regexp.h
- ! reroute.o: reroute.c config.h global.h vararg.h data.h
- ! save.o: save.c config.h global.h vararg.h data.h term.h keymap.h \
- ! news.h
- ! selection.o: selection.c config.h global.h vararg.h data.h term.h\
- ! articles.h
- ! sequence.o: sequence.c config.h global.h vararg.h data.h debug.h
- ! term.o: term.c config.h global.h vararg.h data.h term.h keymap.h
- ! unshar.o: unshar.c config.h global.h vararg.h data.h
- ! update.o: update.c patchlevel.h update.h
- ! variable.o: variable.c config.h global.h vararg.h data.h
-
- * link debugging version
-
-
-